I am trying to more accurately “simulate” an ROV (underwater robot). To do this I need to be able to apply a force at the position of the thrusters. The applyImpulse function appears to be the ticket. Unfourtunatly it seems to have some problems. As a test I have two cubes, each with a thruster attached. One of these thrusters is far away from the cube, and the other is very close to its parent cube. The expected outcome would be for the cube with the thruster close to spin faster than the cube who’s thruster is far away. But in fact the opposite happens. Any ideas are greatly appreciated.
from bge import logic, render import mathutils cont = logic.getCurrentController() own = cont.owner children = own.children for item in children: if 'thrust' in item: thruster = item lvect = thruster.getAxisVect(mathutils.Vector([.1,0,0])) own.applyImpulse(thruster.worldPosition, lvect)