For a project I am having to have an object fall from the sky and then land on the terrain. When the player presses the space bar thrust is applied to slow the descent.
The problem is I cannot get the thrust to apply smoothly. I have tried setting a variable to contain the gravity and another to contain thrust. The thrust is applied (by combining the negative value of the fall with the positive of the thrust, but then it remains. I need it to only apply the thrust for as long as the space bar is pressed and then have gravity take over again as the thrust is off and acceleration towards the ground continues.
Been trying to work on this for 2 days now and having no luck. Any Ideas or suggestion of where to go to find the relevant information?
Thanks in advance
asked May 13 '10 at 12:49 PM
you should create a coroutine for adding and removing some numbers smoothly
then you can have something like this in your Update function
answered May 13 '10 at 01:09 PM