CollisionHandlerPhysical
from panda3d.core import CollisionHandlerPhysical
- class CollisionHandlerPhysical
Bases:
CollisionHandlerEvent
The abstract base class for a number of CollisionHandlers that have some physical effect on their moving bodies: they need to update the nodes’ positions based on the effects of the collision.
Inheritance diagram
- __init__(*args, **kwargs)
- addCollider()
C++ Interface: add_collider(const CollisionHandlerPhysical self, const NodePath collider, const NodePath target) add_collider(const CollisionHandlerPhysical self, const NodePath collider, const NodePath target, DriveInterface drive_interface)
- /**
Adds a new collider to the list with a NodePath that will be updated with
the collider’s new position, or updates the existing collider with a new
NodePath object.
*/
- /**
Adds a new collider to the list with a NodePath that will be updated with
the collider’s new position, or updates the existing collider with a new
NodePath object.
The indicated DriveInterface will also be updated with the target’s new
transform each frame. This method should be used when the target is
directly controlled by a DriveInterface.
*/
- add_collider()
C++ Interface: add_collider(const CollisionHandlerPhysical self, const NodePath collider, const NodePath target) add_collider(const CollisionHandlerPhysical self, const NodePath collider, const NodePath target, DriveInterface drive_interface)
- /**
Adds a new collider to the list with a NodePath that will be updated with
the collider’s new position, or updates the existing collider with a new
NodePath object.
*/
- /**
Adds a new collider to the list with a NodePath that will be updated with
the collider’s new position, or updates the existing collider with a new
NodePath object.
The indicated DriveInterface will also be updated with the target’s new
transform each frame. This method should be used when the target is
directly controlled by a DriveInterface.
*/
- center
- clearCenter()
C++ Interface: clear_center(const CollisionHandlerPhysical self)
- /**
Clears the center NodePath specified with set_center.
*/
- clearColliders()
C++ Interface: clear_colliders(const CollisionHandlerPhysical self)
- /**
Completely empties the list of colliders this handler knows about.
*/
- clear_center()
C++ Interface: clear_center(const CollisionHandlerPhysical self)
- /**
Clears the center NodePath specified with set_center.
*/
- clear_colliders()
C++ Interface: clear_colliders(const CollisionHandlerPhysical self)
- /**
Completely empties the list of colliders this handler knows about.
*/
- getCenter()
C++ Interface: get_center(CollisionHandlerPhysical self)
- /**
Returns the NodePath specified with set_center, or the empty NodePath if
nothing has been specified.
*/
- getClassType()
C++ Interface: get_class_type()
- get_center()
C++ Interface: get_center(CollisionHandlerPhysical self)
- /**
Returns the NodePath specified with set_center, or the empty NodePath if
nothing has been specified.
*/
- get_class_type()
C++ Interface: get_class_type()
- hasCenter()
C++ Interface: has_center(CollisionHandlerPhysical self)
- /**
Returns true if a NodePath has been specified with set_center(), false
otherwise.
*/
- hasCollider()
C++ Interface: has_collider(CollisionHandlerPhysical self, const NodePath collider)
- /**
Returns true if the handler knows about the indicated collider, false
otherwise.
*/
- hasContact()
C++ Interface: has_contact(CollisionHandlerPhysical self)
- /**
Did the handler make any contacts with anything on the last collision pass?
Depending on how your world is setup, this can be used to tell if the
handler is out of the world (i.e. out of bounds). That is the original use
of this call.
*/
- has_center()
C++ Interface: has_center(CollisionHandlerPhysical self)
- /**
Returns true if a NodePath has been specified with set_center(), false
otherwise.
*/
- has_collider()
C++ Interface: has_collider(CollisionHandlerPhysical self, const NodePath collider)
- /**
Returns true if the handler knows about the indicated collider, false
otherwise.
*/
- has_contact()
C++ Interface: has_contact(CollisionHandlerPhysical self)
- /**
Did the handler make any contacts with anything on the last collision pass?
Depending on how your world is setup, this can be used to tell if the
handler is out of the world (i.e. out of bounds). That is the original use
of this call.
*/
- removeCollider()
C++ Interface: remove_collider(const CollisionHandlerPhysical self, const NodePath collider)
- /**
Removes the collider from the list of colliders that this handler knows
about.
*/
- remove_collider()
C++ Interface: remove_collider(const CollisionHandlerPhysical self, const NodePath collider)
- /**
Removes the collider from the list of colliders that this handler knows
about.
*/
- setCenter()
C++ Interface: set_center(const CollisionHandlerPhysical self, const NodePath center)
- /**
Specifies an arbitrary NodePath that the handler is always considered to be
facing. It does not detect collisions with surfaces that appear to be
facing away from this NodePath. This works best when the collision
surfaces in question are polygons.
*/
- set_center()
C++ Interface: set_center(const CollisionHandlerPhysical self, const NodePath center)
- /**
Specifies an arbitrary NodePath that the handler is always considered to be
facing. It does not detect collisions with surfaces that appear to be
facing away from this NodePath. This works best when the collision
surfaces in question are polygons.
*/