How to change gravity when hitting different actors?
Does anyone know how to change gravity in different areas of a scene when hitting different actors?
The game is a water game and I want to change the actor to have no gravity in water, but when the actor jumps out of water then you change his gravity to bring him back in the water.
Any help?
The game is a water game and I want to change the actor to have no gravity in water, but when the actor jumps out of water then you change his gravity to bring him back in the water.
Any help?
Comments
Create a boolean called gravOff set it to false
Have your accelerate down behavior in a rule when attribute gravOff = false
then whenever you want to turn gravity off, change attribute gravOff to true, then change it back to false when you want it to take effect again
So for the water example you gave you would have a rule like so:
When actor overlaps or collides with water
-change attribute gravOff to true
Otherwise
-change attribute gravOff to false