Hello, I was wondering if there is any one variable you can reference when writing scripts to change gravity? If there isn’t, what is a good way to go about changing gravity when a certain thing happens?
Hello @OMN1B,
You can reference the the gravity variable in a script like this:
this.app.systems.rigidbody.gravity
This returns a Vec3 property. You can take a look here as well for more information: RigidBodyComponentSystem | PlayCanvas API Reference
2 Likes
Thank you, this helps a ton.
1 Like