How do i... Apply forward force to a ball from a button press?
Hi, does anyone have any hints or tips on how to apply force to a 'ball character' from a button press?
I only want to go in the direction the character is pointing/facing and depending on how long i hold the button down the more force is applied (to a max value).
This is basically so i can try and create a mini golf type game but could be used in a pool/snooker game.
Cheers
Andy
-
Create a microchip and attach it to your ball. Inside it create a controller sensor, a timer and a mover. I don't have the game at hand, but try having the button press wired into the timer start, and the button release wired into the timer end as well as the power switch of the mover. Wire the timer output into the move speed of the mover (you will inevitably need to use either a calculator or a signal manipulator to get the strength of this right, as it will probably be far too low).
Hopefully that will work/get you close, but the direction will be constant (dictated by the gizmo on the mover). I'm fairly sure that the mover/advanced mover have a direction input, so calculating that direction will probably be your next step. -
Thanks TrenchBucket, i will give it a good go tonight when i get home from work :)
댓글을 남기려면 로그인하세요.