-
Hello, I'm working on an FPS game and I need high precision for raycasting on my objects. However, for the physics simulation, simpler shapes would be sufficient. In the PhysX library, if I remember correctly, there were flags that allowed you to assign one shape for raycasting and another, simpler one for physics simulation within the same rigid body. (https://nvidia-omniverse.github.io/PhysX/physx/5.6.0/docs/RigidBodyCollision.html) I couldn't find a similar approach in Jolt, and I'm wondering how to handle a scene that needs high precision for raycasting while keeping simpler physics shapes for better performance. Do you have any advice on how to best use the Jolt API for this scenario? Thanks in advance :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is possible with Jolt by using the Example using ShapeFilter to ignore certain shapes during collision tests: https://github.com/jrouwe/JoltPhysics/blob/master/Samples/Tests/General/ShapeFilterTest.cpp Example using SimShapeFilter to ignore certain shapes during simulation: https://github.com/jrouwe/JoltPhysics/blob/master/Samples/Tests/General/SimShapeFilterTest.cpp |
Beta Was this translation helpful? Give feedback.
This is possible with Jolt by using the
ShapeFilter
class and theSimShapeFilter
class.Example using ShapeFilter to ignore certain shapes during collision tests:
https://github.com/jrouwe/JoltPhysics/blob/master/Samples/Tests/General/ShapeFilterTest.cpp
Example using SimShapeFilter to ignore certain shapes during simulation:
https://github.com/jrouwe/JoltPhysics/blob/master/Samples/Tests/General/SimShapeFilterTest.cpp