i have been trying to apply a simple linear force to a model i loaded.
I have followed the tutorial in the manual, but replaced the jetpackguy with my own model from blender. nothing seems to happen to my model. i tried gravity too but my model does not even fall or move at all. someone please help or send me some working code as a short tutorial.
Thanks.
Check the simplest thing first… Make sure you’ve enabled particles!
base.enabledParticles()
The physics engine uses the particle engine.
I have a sample of physical actors moving about in a world and reacting with forces here: https://discourse.panda3d.org/viewtopic.php?t=6895
Mainly you need to make sure:
-
Particles are enabled.
-
That you’ve associated your ActorNode with a PhysicsManager. (base.PhysicsMgr is always defined and ready for use.)
-
And finally, that you’ve applied your ForceNode to the correct node. (PhysicsManager for a global force, or the node returned from .getPhysical() on your ActorNode.)