How can I make projectile no mass? #265
-
I need fire a projectile with no gravity and no air resistance. How can I init projectile? This is my test case in the media folder (master branch):
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Air resistance and gravity are typically defined by your It sounds like you might want to just use a ray cast instead of a physical body, though. Even if you want it to take time to fly through the air, you could use one raycast per frame to approximate the line segment traversed by the bullet during that frame. |
Beta Was this translation helpful? Give feedback.
Air resistance and gravity are typically defined by your
IPoseIntegratorCallbacks
. You could disable them for any body. See thePerBodyGravityDemo
for an example of how to choose different gravity values during integration.It sounds like you might want to just use a ray cast instead of a physical body, though. Even if you want it to take time to fly through the air, you could use one raycast per frame to approximate the line segment traversed by the bullet during that frame.