khces
Member
|
input.jump
hello
Each time press the Spacebar to jump I want ....
english sorry .. .. once jump no.
2 time or 3 time ....
(This post was last modified: 10-24-2011 10:47 AM by khces.)
|
|
10-24-2011 10:46 AM |
|
Esenthel
Administrator
|
RE: input.jump
hi, this will work only if the character is on ground (ctrl.onGround()==true)
for other cases you can try applying velocities
ctrl.actor.addVel(..)
|
|
10-24-2011 05:14 PM |
|
khces
Member
|
RE: input.jump
ctrl.actor.addVel() is Is affected by gravity...
i want always jump value and while falling from high too.
How should approach?
thx.
|
|
10-25-2011 04:26 AM |
|
Esenthel
Administrator
|
RE: input.jump
please explain more precisely what you want to achieve
|
|
10-25-2011 11:16 AM |
|
Dwight
Member
|
RE: input.jump
I think he wants to be able to jump in mid-air as well, so a double jump.
Example: The character is on the ground, and the player decides to jump-> character flies in the air, and while in the air, the player presses the jump-key again, and the player goes even higher into the air.
http://www.youtube.com/watch?v=ipMKRkF6JQ8 at 0:37
SnowCloud Entertainment - We are recruiting!
http://www.sc-entertainment.com
|
|
10-26-2011 09:47 AM |
|
khces
Member
|
RE: input.jump
(This post was last modified: 10-26-2011 04:56 PM by khces.)
|
|
10-26-2011 04:02 PM |
|
Esenthel
Administrator
|
RE: input.jump
does that help?
Code:
if(!onGround())
{
Vec vel=ctrl.actor.vel();
vel.y=jump_velocity;
ctrl.actor.vel(vel);
}
|
|
10-28-2011 12:00 PM |
|
khces
Member
|
RE: input.jump
ah.. good thx.
|
|
10-31-2011 05:49 AM |
|