- Home /
Trying to create glide effect
I'm trying to create a gliding effect with my character when the ctrl button is pressed (and jumping), but so far I'm having no success
My current attempt is this:
function Update() {
if (Input.GetButton ("Fire1")) {
Debug.Log("Glide");
rigidbody.AddForce (0,10,0);
}
I did try manipulating gravity and while it did work it heavily affected the actual jump, which looked unrealistic. I think adding an upward force would look more realistic and cause less problems
If anyone could help me out this would be really appreciated
perhaps you can try adjusting the rigidbody velocity directly during the glide phase ins$$anonymous$$d? like continuously set it to a value
Answer by Dreamside · Mar 01, 2012 at 12:23 PM
I'm not sure but i think you should check this AddRelativeForce
It looks to me that that will add a force according to the objects axes, which means if he rotates he would be pushed another direction other than up. I will give it a try though once I get it working
Your answer
Follow this Question
Related Questions
Third person controller in Flight 1 Answer
How to make sure that my cube can only jump when in contact with the ground 2 Answers
Please help me to make a run, jump and fly through the air. 1 Answer
Making character to fly 1 Answer
how can I make a character fly when holding down the jump button? 1 Answer