Hello,
I got a problem which I think can be solved 2 ways.
The problem:
I have 10 cubes, 1 cube is controlled by the player.
What I need is that when I change the gravity using:
import GameLogic as gl
import bge
def main(cont):
cont = bge.logic.getCurrentController()
own = cont.owner
q = cont.sensors['q']
if q.positive:
print("check")
gl.setGravity([0, 0, 9.81])
elif not q.positive:
gl.setGravity([0, 0, -9.81])
I need the 9 other cubes be affected by it and the cube being controlled by the player unaffected by the change (so this cube keeps the -9.81 gravity)
If you think another code is better, please do.
This was the easiest way to change gravity, the only problem is that EVERYTHING (every rigid body atleast) is affected by it.
BTW the player controlled cube is also a rigid body, because it does need the normal physics (for jumping and collision etc)
I hope my problem is clear.
Can someone please help me or point me in the right direction.
Thanks in advance,
H34DhUnT3r