How do I remove gravity for one specific component

https://playcanvas.com/project/1208714/overview/physics-lab

In this project, I want all objects to fall with gravity but not the player.

Hi @Michael_Savage and welcome!

Maybe you can set the Linear Factor of the players rigidbody to zero on the y-axis, but Iā€™m afraid that means the player can also not jump anymore.

component-rigid-body-dynamic-4445b8fb008d63c06781163359a0a410

You can apply force on every update opposite to gravity. So, if your gravity is (0, -9.81, 0), then you can apply force on player (0, +9.81, 0). This way, it will balance out and player will not be affected by it.

1 Like