Increasing Speed

Hi I have one question, I am working on a 2D sidescroller and i havn’t to modify my jumping script.

I want to make the character fall much faster, the gravity mechanic does not really work since this also affects my jumping hight etc.

So what I want to do is check the position of my character when he is jumping and as soon as the Y position which is increasing when he is jumping goes down again the gravity should apply. (Hope you understand wht I mean)

This should be done in Javascript. I guess it should somehow work with transform.position or so…

I am not asking for you to write me a script I just want to know how to check when the Y position is going down again. Since I have different plattforms on different hights I cannot set a fix value on how high achar can jump, therefore i need to check when is the position getting a negativ value (character is falling)

It sounds like you have a plan for determining when the character starts coming back down from the jump, so if your object has a rigidbody component attached, you could apply a downward downward force to the object as it starts to descend until it completes the jump, i.e. objRigidBody.AddForce or AddRelativeForce.

http://unity3d.com/support/documentation/ScriptReference/Rigidbody.html

The easiest way I can think to do that, is to check your rigidibody’s velocity property when it’s jumping/in the air. When the the velocity is such that it’s pushing your rigidbody toward the ground again, use the addforce function to push the rigidbody toward the ground faster. Hopefully this is enough to get you going on the right track. Good luck!