restored from pc, added .editorconfig
This commit is contained in:
18
Assets/jelycho/Code/Player/PlayerActor.cs
Normal file → Executable file
18
Assets/jelycho/Code/Player/PlayerActor.cs
Normal file → Executable file
@@ -42,15 +42,10 @@ namespace RealityReboot.jelycho.Player {
|
||||
public void Look(Vector2 input) {
|
||||
m_Camera.Rotate(input.x, input.y);
|
||||
}
|
||||
|
||||
public void MoveRight(float input) {
|
||||
float3 direction = Quaternion.AngleAxis(m_Camera.Yaw, Vector3.up) * Vector3.right;
|
||||
m_Locomotion.AddMovementInput(direction, input);
|
||||
}
|
||||
|
||||
public void MoveForward(float input) {
|
||||
float3 direction = Quaternion.AngleAxis(m_Camera.Yaw, Vector3.up) * Vector3.forward;
|
||||
m_Locomotion.AddMovementInput(direction, input);
|
||||
|
||||
public void SetMoveInput(Vector2 input) {
|
||||
float3 direction = Quaternion.AngleAxis(m_Camera.Yaw, Vector3.up) * new float3(input.x, 0.0f, input.y);
|
||||
m_Locomotion.SetWishDirection(direction);
|
||||
}
|
||||
|
||||
public void StartDrag() {
|
||||
@@ -71,11 +66,12 @@ namespace RealityReboot.jelycho.Player {
|
||||
}
|
||||
|
||||
void UpdateAnimator() {
|
||||
float forwardNormalized = m_Locomotion.LocalVelocity.z / m_Locomotion.maxMovementSpeed;
|
||||
float forwardNormalized = m_Locomotion.LocalVelocity.z / m_Locomotion.runSpeed;
|
||||
|
||||
m_Animator.SetFloat(AnimatorParamHashes.s_VelocityForwardNormalized, forwardNormalized);
|
||||
m_Animator.SetFloat(AnimatorParamHashes.s_VelocityRightNormalized, 0.0f);
|
||||
m_Animator.SetBool(AnimatorParamHashes.s_IsGrounded, true);
|
||||
|
||||
m_Animator.SetBool(AnimatorParamHashes.s_IsGrounded, m_Locomotion.IsGrounded);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user