I’m trying to make a space ship that floats around in space using only python linear velocity, but it’s acting strange when it rotates. It has something to do with local linear velocity.
you should save your own linear and angular velocity
if not "linVel" in own: own["linVel"] = mathutils.Vector((0,0,0))
if not "linAng" in own:
own["linAng"] = mathutils.Vector((0,0,0))
own["linVel"] += (SelfXVec + SelfYVec)
own["linAng"] += (SelfZrVec + SelfZlVec)
own.setLinearVelocity(own["linVel"], True)
own.setAngularVelocity(own["linAng"])