air acceleration while jumping..

hi…

some idea how to set acceleration while jumping?.
i mean without moving, if you jump and while in air you can move a bit…

just give me a word and i will investigate it :wink:

Is this in combination with a character controller? If it is, the character controller.move would suffice, you just have to limit the controls. If it is just a rigidbody, then you would still limit the controls affected on the current velocity.

hey BigMisterB thanks, is character controller… so do you think with controller.move i should get it… i will try…

could works something like this ?

if (jumping) {
	var cam : Transform = Camera.main.transform;
	var forward : Vector3 = cam.TransformDirection(Vector3.forward);
	var right : Vector3 = cam.TransformDirection(Vector3.right);
	controller.move(forward * 10);
	controller.move(right * 10);

I think that in your jumping code, you would only want to add the jump addition to the Y. In the other code you would have it say something like “If we are not grounded we can move” where I would say “you can move, but if your not grounded the move is multiplied by 0.25” or something like that. So its not in the jump, its in the move.

Post the entire movement code…

Hey, I’m curious about how to do this as well. I’m making an FPS and using the character controller. I’d like to give the character some slight movement ability while in the air.

i’m understanding what you are saying Big, i will try that you are saying, i will post my code when i have advanced it a bit more because i just have separately the animation script with motor script…btw when i finish i will publish the code here motionsmith…

thanks…!

This is my code :

When i jump does not move, i’m missing something for sure…
what could be

thanks…

ps: i didn’t mention it… here is the code that makes player jumps :

if (canJump  Input.GetButton("Jump")) {
    movement += transform.up * Mathf.Sqrt(2 * 3 * 50);
}

bump. am sorri giust tu kip alaiv dis post

:wink:

:open_mouth: your same setup as me bottom bar and all and i use notepad :stuck_out_tongue: :slight_smile: <3 <3

Thanks for help bumping hehe…

Notepad ++ is soft :wink: