Rosegold::Physics
Inherits Reference / Object
Updates the player feet/look/velocity/on_ground by sending movement packets.
Constants
Block slipperiness values
Epsilon constants for floating point precision
Send a keep-alive movement packet every 20 ticks (1 second) even when stationary This prevents server timeouts while avoiding packet spam
Constructors
Class methods
Returns all block collision boxes that may intersect entity_aabb during the movement from start by vec.
entity_aabb is at 0,0,0; the returned AABBs are grown by entity_aabb so collision checks are just raytracing.
Applies collision handling including stepping. Returns adjusted movement vector and adjusted post-movement velocity.
Applies collision handling including stepping. Returns adjusted movement vector and adjusted post-movement velocity.
Instance methods
Set the movement target location and wait until it is achieved.
If there is already a movement target, it is cancelled, and replaced with this new target.
Set target=nil to stop moving and cancel any current movement.
stuck_timeout_ticks specifies how many consecutive stuck ticks before throwing MovementStuck.