#How can I change the direction a player is facing?

1 messages · Page 1 of 1 (latest)

gritty agate
#

I tried using the get and set rotation methods but it doesn't seem to do anything to a player.

Here is the code I used:

world.afterEvents.entityHurt.subscribe(data => {
    const rotation = data.damageSource.damagingEntity.getRotation();
    data.hurtEntity.setRotation(rotation);
})```
quaint cosmos
#

Only way I know to update the player's rotation is via teleportation.

novel trout
#

/tp or the tp method, I am pretty sure that the set rotation method only works on entity’s and not players.

gritty agate
novel trout