Collision Trigger based constant force alterations
First off let me apologize, I have no coding experience so please dont assume any prior knowledge in your response, and I'd like to understand what I'm doing as well rather than just copy pasting.
So basically, I have a world with no gravity, and constant force being used to simulate it. I need a script that upon my player character (a cube) touching a certain pad on the floor, it will either change the constant force variables on the player (to make it seem like gravity is being altered) OR another game object. I need too so that everytime you hit the pad it switches between one of two states, either on or off basically, as well as making sure that everything resets upon a level reset. Some pads will affect the play and some objects in the world around them.
Right now i have a constant force in the Y on my player of -25. I would want, upon touching one of these pads, to switch it to 25 to flip gravity, or even set it to zero and set the x or z to 25 or -25.
Any help?! Thanks so much!
Your answer
Follow this Question
Related Questions
OnTriggerExit not working 0 Answers
Copy collision object position (Or just "fly" a little bit) 0 Answers
how can I align a rotating block that falls onto another with the correct face? 2 Answers
Rigidbody - How to make it jump and fall down fast ? Help needed. 1 Answer
GameObject Doesn't Fall When Moving Or Collide With Objects From Front. 0 Answers