Add options menu and sound volume options logic
This commit is contained in:
parent
dfed2cc0e4
commit
91482820da
5 changed files with 1384 additions and 12 deletions
|
@ -172,10 +172,14 @@ public class Player : MonoBehaviour, IKitchenObjectParent
|
|||
// set isWalking to true if moveDir is not (0,0,0)
|
||||
isWalking = moveDir != Vector3.zero;
|
||||
|
||||
float rotateSpeed = 10f;
|
||||
// smothly rotate towards moveDir with a Slerp smoothed operation.
|
||||
// Slerp is for like rotations while Lerp is for positions
|
||||
transform.forward = Vector3.Slerp(transform.forward, moveDir, Time.deltaTime * rotateSpeed);
|
||||
if (isWalking)
|
||||
{
|
||||
float rotateSpeed = 10f;
|
||||
// smothly rotate towards moveDir with a Slerp smoothed operation.
|
||||
// Slerp is for like rotations while Lerp is for positions
|
||||
transform.forward = Vector3.Slerp(transform.forward, moveDir, Time.deltaTime * rotateSpeed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void SetSelectedCounter(BaseCounter selectedCounter)
|
||||
|
|
Reference in a new issue