How can i change Gravity in an Area
How can i change the gravity for all gameobeject in a Cube Area? So if a Player or something else enter the cube they will fly in air but if the left it they will fall down ?
Answer by hexagonius · Oct 22, 2016 at 08:21 PM
It depends on what you're using. Rigidbody, Rigidbody2D, or CharacterController. Because they all have different basic implementations of gravity, but they all use Unity's overall gravity settings one way or another. What's the same for all of them would be, that the change comes with entering or exiting a trigger volume around your "Cube Area".
CharacterController: You have to use the Move method and might already have implemented your own gravity. change the values as needed
Rigidbody: set it's useGravity to false and use your own implementation of gravity
Rigidbody2D. you can just set the gravityScale to some multiple of the overall gravity, even negate it
Your answer
Follow this Question
Related Questions
Check for collision while animating 0 Answers
How to change the player gravity level?,How to change the value of the players gravity? 1 Answer
Trying to make a Parkour Platformer! 0 Answers
HTC vive (VR) blood/flash screen effect. 0 Answers
I want my character to enter and exit car with animation 1 Answer