0.2.0-dev Download ZIP
31 lines ·1.6 KB Raw
| 1 | // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics) |
| 2 | // SPDX-FileCopyrightText: 2021 Jorrit Rouwe |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | |
| 5 | #pragma once |
| 6 | |
| 7 | JPH_NAMESPACE_BEGIN |
| 8 | |
| 9 | /// Motion quality, or how well it detects collisions when it has a high velocity |
| 10 | enum class EMotionQuality : uint8 |
| 11 | { |
| 12 | /// Update the body in discrete steps. Body will tunnel through thin objects if its velocity is high enough. |
| 13 | /// This is the cheapest way of simulating a body. |
| 14 | Discrete, |
| 15 | |
| 16 | /// Update the body using linear casting. When stepping the body, its collision shape is cast from |
| 17 | /// start to destination using the starting rotation. The body will not be able to tunnel through thin |
| 18 | /// objects at high velocity, but tunneling is still possible if the body is long and thin and has high |
| 19 | /// angular velocity. Time is stolen from the object (which means it will move up to the first collision |
| 20 | /// and will not bounce off the surface until the next integration step). This will make the body appear |
| 21 | /// to go slower when it collides with high velocity. In order to not get stuck, the body is always |
| 22 | /// allowed to move by a fraction of it's inner radius, which may eventually lead it to pass through geometry. |
| 23 | /// |
| 24 | /// Note that if you're using a collision listener, you can receive contact added/persisted notifications of contacts |
| 25 | /// that may in the end not happen. This happens between bodies that are using casting: If bodies A and B collide at t1 |
| 26 | /// and B and C collide at t2 where t2 < t1 and A and C don't collide. In this case you may receive an incorrect contact |
| 27 | /// point added callback between A and B (which will be removed the next frame). |
| 28 | LinearCast, |
| 29 | }; |
| 30 | |
| 31 | JPH_NAMESPACE_END |