Skip to content

Commit 1ebc62c

Browse files
committed
2 parents 25a09af + 71f568c commit 1ebc62c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Mods/Movement.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,14 +589,31 @@ public static void WASDFly()
589589
bool Shift = UnityInput.Current.GetKey(KeyCode.LeftShift);
590590
bool Alt = UnityInput.Current.GetKey(KeyCode.LeftAlt);
591591

592+
bool LeftArrow = UnityInput.Current.GetKey(KeyCode.LeftArrow);
593+
bool RightArrow = UnityInput.Current.GetKey(KeyCode.RightArrow);
594+
bool UpArrow = UnityInput.Current.GetKey(KeyCode.UpArrow);
595+
bool DownArrow = UnityInput.Current.GetKey(KeyCode.DownArrow);
596+
592597
if (stationary || W || A || S || D || Space || Ctrl)
593598
GorillaTagger.Instance.rigidbody.linearVelocity = Vector3.zero;
594599

595600
if (!menu)
596601
{
602+
Transform parentTransform = GTPlayer.Instance.GetControllerTransform(false).parent;
603+
604+
float turnSpeed = 250f;
605+
606+
if (LeftArrow)
607+
parentTransform.eulerAngles += new Vector3(0, -turnSpeed, 0) * Time.deltaTime;
608+
if (RightArrow)
609+
parentTransform.eulerAngles += new Vector3(0, turnSpeed, 0) * Time.deltaTime;
610+
if (UpArrow)
611+
parentTransform.eulerAngles += new Vector3(-turnSpeed, 0, 0) * Time.deltaTime;
612+
if (DownArrow)
613+
parentTransform.eulerAngles += new Vector3(turnSpeed, 0, 0) * Time.deltaTime;
614+
597615
if (Mouse.current.rightButton.isPressed)
598616
{
599-
Transform parentTransform = GTPlayer.Instance.GetControllerTransform(false).parent;
600617
Quaternion currentRotation = parentTransform.rotation;
601618
Vector3 euler = currentRotation.eulerAngles;
602619

0 commit comments

Comments
 (0)