# Enabling physics on a node¶

The ActorNode is the component of the physics system that tracks interactions and applies them to a model. The calculations factor in the amount of time elapsed between frames, so the physics will be robust against changes in framerate.

To enable a node for physics, attach it to an ActorNode. An ActorNode’s position and orientation can be updated automatically by the physics system, and so any children of the ActorNode will inherit that position and orientation as well.

(Do not confuse ActorNode with the Actor class, which is used to play animations. They are completely unrelated classes with similar names.)

When an ActorNode is created, it must be associated with a PhysicsManager. The PhysicsManager will handle the physics calculations every frame and update the ActorNode with any changes. Panda provides a default physics manager, base.physicsMgr, which will often be suitable for most applications.

node = NodePath("PhysicsNode")
node.reparentTo(render)
an = ActorNode("jetpack-guy-physics")
anp = node.attachNewNode(an)
base.physicsMgr.attachPhysicalNode(an)

an.getPhysicsObject().setMass(136.077)   # about 300 lbs