Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class XXXXXXX
- {
- ....
- private var currentRotationCircleAngle : float;
- ....
- timer function XXXX( deltaTime : float , id : int)
- {
- var playerPos : Vector;
- var playerRot : EulerAngles;
- var wispPos : Vector;
- var wispRotationCircleRadius : float;
- var wispSpeed : float;
- wispSpeed = 10;
- wispRotationCircleRadius = 1;
- currentRotationCircleAngle += deltaTime * wispSpeed;
- while(currentRotationCircleAngle > 360) currentRotationCircleAngle -= 360;
- playerPos = thePlayer.GetWorldPosition();
- playerRot = thePlayer.GetWorldRotation();
- wispPos.X = playerPos.X + CosF(Deg2Rad(currentRotationCircleAngle)) * wispRotationCircleRadius;
- wispPos.Y = playerPos.Y + SinF(Deg2Rad(currentRotationCircleAngle)) * wispRotationCircleRadius;
- wispPos.Z = playerPos.Z + 2;
- this.TeleportWithRotation(wispPos, playerRot);
- }
Advertisement
Add Comment
Please, Sign In to add comment