I'm working on a space simulator and I am currently using the .applyForce() method to move objects. Is it possible to set both a local force (thust) and a global force (3d gravity) to act on an object at the same time? If so, is there a built in function for converting the orientation of a given force?
You can do multiple applyForce() calls per frame, some local, some global and blender works everything out - summing them together to apply a correct total amount of force in the correct direction.
obj = cont.owner obj.applyForce([0, 0, -9.8], False) # Global gravity obj.applyForce([0, 10, 0], True) # Accelearte locally
Or you can do the coordinate conversions manually using the worldOrientation matrix.