3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Move code  (Read 986 times)

« on: September 21, 2009, 05:50:51 AM »
When I apply a force to a rigid body en I stop the force, the object still moves. How do I make the influence of the force completly stop after an event?

And how to make the following happen:
when "left" is pressed ones, move a few steps left. When left is pressed continuously keep going left at a certain speed untill "left" is not pressed anymore?
FPS game creator for 3drad and >2000 games GamesAtNight
« Reply #1 on: September 21, 2009, 07:05:02 AM »
have you tried adjusting rigidbody "Linear Damping", maybe to: 0.7 or less ?

worked for me, using forces and rigidbody ball object as character.
http://3dradder.blogspot.com/ <- Stuff 4 3DRad   | *Donate now: Post-prosessing shaders | External Script editor mEH*
« Reply #2 on: September 22, 2009, 03:27:25 AM »
Perfect. It does work! I attached a project. When the "left" is pressed the rb moves left. When the "right" is pressed, the rb stops.

Fernando, when can we expect the onrelease condition for EventOnImput, so that i can make the rb stop when the "left" is not pressed anymore?
FPS game creator for 3drad and >2000 games GamesAtNight
« Reply #3 on: September 22, 2009, 03:38:34 AM »
Daniel, here you have a version when it stops when the "left" isnt pressed anymore.

what I did was set 0.1 to timer for the force so it auto-stop and check "Continuos" in EvenOnInput, so the force start again all the time when "left" is pressed.

:)
Crashing Boxes - winner of the 3d games category at the 5th Uruguayan video game contest
get a copy for your iPad/iPhone!
« Reply #4 on: September 22, 2009, 04:28:52 AM »
Fernando, when can we expect the onrelease condition for EventOnImput, so that i can make the rb stop when the "left" is not pressed anymore?

Development for this is complete and it will be included to the October 2009 update (out first week of October).
Pages: [1]