- Home /
Why ? My character is fall to floor very slow
Why ? My character is fall to floor very slow
i want too make my character fall very fast
this is my character script
var speed:float=5;
var onFloor:boolean=false;
var gravitypoint:float=1;
function Update ()
{
if(Input.GetButton("Horizontal"))
{
rigidbody.velocity = Vector3 (Input.GetAxis("Horizontal")*speed,rigidbody.velocity.y,0);
if (Input.GetAxis("Horizontal")>0)
{transform.localScale.x=-187;
side=1;
}
else
{transform.localScale.x=187;
side=0;}
}
if(Input.GetButton("Jump")&& onFloor)
{rigidbody.velocity = Vector3(rigidbody.velocity.x,-Physics.gravity.y*gravitypoint,0);}
var hit:RaycastHit;
var rayCastLenght=15;
if(Physics.Raycast(transform.position,-Vector3.up,hit,rayCastLenght))
{
if(hit.collider.gameObject.tag=="box")
{ onFloor=true;}
}
else
{ onFloor=false;
}
}
Answer by Roman Alexandru · Jul 03, 2014 at 11:58 AM
If you are using an animator controller, you can disable "Apply root motion" under your caracter's Animator.
Yes, it falls well when we disable "apply root motion," however, the animations don't make the player move; like walking animation, keep walking at the same spot.
Answer by Statement · Mar 08, 2013 at 03:29 PM
Try changing gravity settings in Edit/Project Settings/Physics, or scale down your character.
Maybe your character is very very big? In that case everything appears to fall slower. If your character is 2 units tall, it would appear to fall faster. Obviously they would fall at the same accelerating rate, but bigger objects don't fall faster than smaller object or vice versa. They still travel the same distance. But for a big object to fall 0.5 meters in a second makes it look like it's not falling very fast at all. However a needle falling 0.5 meters makes it look like it's falling quite fast. I see your localscale is 187, this suggests that you have a character that is 200 meters wide. Perhaps something like 600 meters tall? It wouldn't appear to fall very fast.
Answer by esaavedra76 · Oct 19, 2013 at 03:55 AM
i had the same problem. i didn't want to mess with the physics (like changing gravity, etc.). i noticed the issue was related to the animator controller. if your character behaves as expected when you remove the controller from the animator component, then try baking the root transform position (y), and reactivate your controller. this should solve your problem.
esaavedra76, what do you mean bake the root transform position (y)? In each animation that is in the animator controller? I tried that and it didn't work. I'd love to know the setting you're talking about.
Answer by knuckles209cp · Oct 19, 2013 at 05:23 AM
check if there arent any colliders apart from the actuall player :)
Answer by singhlaxman9761 · Apr 08, 2021 at 12:01 PM
Increase Mass property and Angular Drag value in Rigidbody Component.
You really should read everything before you post, not only is this an 8 year old post but the answer you gave has already been given. You are greatly impacting your percentage of Correct answers if it matters to you at all.