rotate
Rotate an entity by a Vec2 (pitch, yaw).
Parameters
target
target entity
rot
rotation vector (x=pitch, y=yaw)
relative
whether rotation is relative
fun rotate(target: Entity, lookAt: Entity, targetAnchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET, lookAtAnchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET)
Rotate an entity to look at another entity.
Parameters
target
entity to rotate
look At
entity to look at
target Anchor
anchor point on the target
look At Anchor
anchor point on lookAt entity
fun rotate(target: Entity, lookAt: Vec3, targetAnchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET, lookAtAnchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET)
Rotate an entity to look at a position.
Parameters
target
entity to rotate
look At
position to look at
target Anchor
anchor on target entity