self.thruster = NodePath(“thruster”) # make a thruster for the model
self.thruster.reparentTo(self.Mod1)
self.thruster.setPos(0,-2,10)
self.thrusterFN=ForceNode('jump-thruster') # Attach a thruster force
self.thrusterFNP=self.thruster.attachNewNode(self.thrusterFN)
self.thrusterForce=LinearVectorForce(0,0,4000)
self.thrusterForce.setMassDependent(1)
self.thrusterFN.addForce(self.thrusterForce)
self.actorNode.getPhysical(0).addLinearForce(self.thrusterForce)
#self.thruster.setP(-45) # bend the thruster nozzle out at 45 degrees
I used this code from the manual to apply force to my model, but it doesn’t affect it. I want a force to push my model in a direction. Using a task doesn’t work either. Can someone help me get this to work, please?