Rotation.LookAt
Reply on sbox.game-
Bot
Rotation.LookAt : api/Rotation/LookAt -
Simple component which makes the object always face towards the scene's camera:
public sealed class FaceTowardsCamera : Component { protected override void OnUpdate() { WorldRotation = Rotation.LookAt( WorldPosition - Scene.Camera.WorldPosition ); } } -
oooor you can use the static method meant for this! https://sbox.game/api/Rotation/FromToRotation