rotate

fun rotate(target: Entity, rot: Vec2, relative: Boolean = false)

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

lookAt

entity to look at

targetAnchor

anchor point on the target

lookAtAnchor

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

lookAt

position to look at

targetAnchor

anchor on target entity