CollisionHandlerPhysical¶
-
class CollisionHandlerPhysical¶
Bases:
CollisionHandlerEventThe abstract base class for a number of
CollisionHandlersthat have some physical effect on their moving bodies: they need to update the nodes’ positions based on the effects of the collision.Inheritance diagram
digraph inheritancefb3e607aed { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "CollisionHandler" [URL="acron.core.CollisionHandler.html#acron.core.CollisionHandler",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "CollisionHandler" [arrowsize=0.75,style=""]; "CollisionHandlerEvent" [URL="acron.core.CollisionHandlerEvent.html#acron.core.CollisionHandlerEvent",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "CollisionHandler" -> "CollisionHandlerEvent" [arrowsize=0.75,style=""]; "CollisionHandlerPhysical" [URL="acron.core.CollisionHandlerPhysical.html#acron.core.CollisionHandlerPhysical",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "CollisionHandlerEvent" -> "CollisionHandlerPhysical" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }- CollisionHandlerPhysical.__reduce__()¶
- CollisionHandlerPhysical.__setstate__()¶
- CollisionHandlerPhysical.add_collider()¶
Adds a new collider to the list with a
NodePaththat will be updated with the collider’s new position, or updates the existing collider with a newNodePathobject.Adds a new collider to the list with a
NodePaththat will be updated with the collider’s new position, or updates the existing collider with a newNodePathobject.The indicated
DriveInterfacewill also be updated with the target’s new transform each frame. This method should be used when the target is directly controlled by aDriveInterface.
- CollisionHandlerPhysical.clear_colliders()¶
Completely empties the list of colliders this handler knows about.
- CollisionHandlerPhysical.get_center()¶
Returns the
NodePathspecified withset_center, or the emptyNodePathif nothing has been specified.
- static CollisionHandlerPhysical.get_class_type()¶
- CollisionHandlerPhysical.has_center()¶
Returns true if a
NodePathhas been specified withset_center(), false otherwise.
- CollisionHandlerPhysical.has_collider()¶
Returns true if the handler knows about the indicated collider, false otherwise.
- CollisionHandlerPhysical.has_contact()¶
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.
- CollisionHandlerPhysical.remove_collider()¶
Removes the collider from the list of colliders that this handler knows about.