CollisionHandlerFloor
-
class CollisionHandlerFloor
Bases:
CollisionHandlerPhysical
A specialized kind of
CollisionHandler
that sets the Z height of the collider to a fixed linear offset from the highest detected collision point each frame. It’s intended to implement walking around on a floor of varying height by casting a ray down from the avatar’s head.Inheritance diagram
-
CollisionHandlerFloor(void)
-
static TypeHandle get_class_type(void)
-
PN_stdfloat get_max_velocity(void) const
Retrieves the maximum speed at which the object will be allowed to descend towards a floor below it, in units per second. See
set_max_velocity()
.
-
PN_stdfloat get_offset(void) const
Returns the linear offset to add to (or subtract from) the highest detected collision point to determine the actual height at which to set the collider.
-
PN_stdfloat get_reach(void) const
Returns the reach to add to (or subtract from) the highest collision point
-
void read_datagram(DatagramIterator &source)
Restores the object state from the given datagram, previously obtained using __getstate__.
-
void set_max_velocity(PN_stdfloat max_vel)
Sets the maximum speed at which the object will be allowed to descend towards a floor below it, in units per second. Set this to zero to allow it to instantly teleport any distance.
-
void set_offset(PN_stdfloat offset)
Sets the linear offset to add to (or subtract from) the highest detected collision point to determine the actual height at which to set the collider.
-
void set_reach(PN_stdfloat reach)
Sets the reach to add to (or subtract from) the highest collision point
-
CollisionHandlerFloor(void)