18 lines
563 B
C#
18 lines
563 B
C#
using UnityEngine;
|
|
|
|
namespace RealityReboot.jelycho.game {
|
|
[AddComponentMenu(GameConsts.k_AddComponentMenu + "Active Ragdoll/Humanoid Ragdoll")]
|
|
public class HumanoidActiveRagdoll : MonoBehaviour {
|
|
[SerializeField] ActiveRagdollBone m_Head;
|
|
[SerializeField] ActiveRagdollBone m_Hips;
|
|
|
|
[SerializeField] float m_UpRightTorque = 400.0f;
|
|
|
|
void Start() {
|
|
}
|
|
|
|
void FixedUpdate() {
|
|
m_Hips.Rigidbody.AddTorque(m_Hips.transform.up * m_UpRightTorque, ForceMode.VelocityChange);
|
|
}
|
|
}
|
|
} |