restored from pc, added .editorconfig

This commit is contained in:
2025-05-26 17:08:43 +02:00
parent c11e51ec38
commit 62cb740f69
249 changed files with 2134 additions and 596 deletions

18
Assets/jelycho/Code/Player/PlayerActor.cs Normal file → Executable file
View 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);
}
}
}