Sorry for my bad english. I want to add force to ragdoll like this:
if (Physics.Raycast(this.transform.position, playerCamera.transform.forward, out hit, fireRange))
{
if (hit.collider.tag == "Ragdoll")
{
hit.collider.gameObject.GetComponent<ForcePush>().OnRayPush(this.transform.position, hit.point, 6000f);
}
}
public void OnRayPush(Vector3 firePos, Vector3 hitPos, float pushForce)
{
Vector3 incomeVector = ((hitPos) - (firePos));
incomeVector = incomeVector.normalized;
rigidbody.AddForceAtPosition((incomeVector) * pushForce, hitPos);
}
When I play ragdoll is distorted like in the screenshot:
I don't know the reason. Is force too strong?
But i want to throw strongly. How can i fix this stability problem ?
Please help.
Thanks