Added Site Data
This commit is contained in:
@ -207,7 +207,7 @@ public class PlayerInteractionHandler : MonoBehaviour
|
||||
this.DisableFlashlight();
|
||||
|
||||
float aimAxis = Input.GetAxis("Aim");
|
||||
print("Aim:" + aimAxis);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -28,6 +28,8 @@ public class PlayerMovementController : MonoBehaviour
|
||||
[SerializeField]
|
||||
private Camera cam;
|
||||
|
||||
[HideInInspector]
|
||||
public bool AllowRotation = false;
|
||||
|
||||
|
||||
|
||||
@ -68,14 +70,20 @@ public class PlayerMovementController : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
AllowRotation = Input.GetMouseButton(1);
|
||||
GetMovementOld();
|
||||
MovePlayer();
|
||||
|
||||
animcontroller.Animate(new Vector2(x, y), false,isRunning);
|
||||
|
||||
this.lookingDirectionVector = ((cameraController.Forward * y) + cameraController.Right * x).normalized;
|
||||
if (isRunning && !Input.GetMouseButton(1))
|
||||
if (isRunning && !Input.GetMouseButtonDown(1)||AllowRotation)
|
||||
{
|
||||
if (AllowRotation && x == 0 && y == 0)
|
||||
{
|
||||
this.lookingDirectionVector = cameraController.Forward.normalized;
|
||||
}
|
||||
|
||||
SlowLookAt(this.lookingDirectionVector);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user