able to glide?

how would i make a character able to glide on a button press? would i just have to effect the player’s gravity? and how would i restrict the action to being able to be used while only in the air?

im using the default movement scripts.

What you need to do is incredibly simple… ++++++++

1-Use the third Person Controller script

2-Go at the line where it says " IsJumping " (it’s quite obvious, you’ll see )

3-simply add a couple of " if " statements :

//I’ve set the gliding key to “E” since it’s quite confortable for your left hand while moving.

If(Input.GetKey (KeyCode.E)) {
Gravity = 7;
animation.CrossFade(“Your Glide Animation HERE”);
}

If(Input.GetKeyUp (KeyCode.E)) {
Gravity = 20;
animation.Stop(“Your Glide Animation HERE”);
}

There your code lets your “Glide” only while jumping!
*(IMPORTANT) Make sure this portion of code is written within the " IsJumping " statement!

(NB : you could use an " Else " technique instead but I like it better when it’s hard coded )

*You can also tell the script to let you accelerate while gliding by adding value to the inAirAcceleration (what ever it’s called you’ll recognize the variable). However that portion of code should be added just below the " Gravity = x "

EXAMPLE :
(…the " if " statement…)

Gravity = 7;
InAirAcceleration = 80;

(…rest of the code…)

I truly hope this works out for you quite well my friend!

Add me on facebook, we could share our projects (news, etc, help…) look for Redirecting... .:sunglasses:

any body know animation creator for unity

if any one would like to join me to finish a project