Motor bike wheelie issue
Hi everyone :)
So I'm creating a game in which there is a motorbike that is controlled using the arrow keys. Pressing spacebar causes the motorbike to do a wheelie. I have managed the wheelie part by starting an event when the spacebar is pressed to call a turn function which causes the motobike to tilt backwards. Unfortunately, it seems that when the motorbike is tilted backwards, pressing the forwards key causes it to zoom off in whichever way the motorbike is facing, which in this instance would be upwards at a 45 degree angle. Does anyone have any idea on how to stop this from happening? Many thanks, Adam |
[QUOTE=InstigatedApprentice;57893]Hi everyone :)
So I'm creating a game in which there is a motorbike that is controlled using the arrow keys. Pressing spacebar causes the motorbike to do a wheelie. I have managed the wheelie part by starting an event when the spacebar is pressed to call a turn function which causes the motobike to tilt backwards. Unfortunately, it seems that when the motorbike is tilted backwards, pressing the forwards key causes it to zoom off in whichever way the motorbike is facing, which in this instance would be upwards at a 45 degree angle. Does anyone have any idea on how to stop this from happening? Many thanks, Adam[/QUOTE] [SIZE="1"]In general, the "as seen by" method extension is usually helpful to me in a scenario like this. I would make the "move" method (the method that makes the motorbike go forward) be "as seen by" an object that is always flat to the ground. If you want the motorbike to turn left or right, make the object flat to the ground turn.[/SIZE] [SIZE="3"][COLOR="Red"]EDIT:[/COLOR] On second thought, there is an easier way. Try making a dummy on the motorbike that has the "forward/turning" control instead of the motorbike, and set the motorbike's vehicle to the dummy. Keep it so that the motorbike, not the dummy, turns backwards for the wheelie, though.[/SIZE] |
[QUOTE=sometimes618;57895][SIZE="1"]In general, the "as seen by" method extension is usually helpful to me in a scenario like this.
I would make the "move" method (the method that makes the motorbike go forward) be "as seen by" an object that is always flat to the ground. If you want the motorbike to turn left or right, make the object flat to the ground turn.[/SIZE] [SIZE="3"][COLOR="Red"]EDIT:[/COLOR] On second thought, there is an easier way. Try making a dummy on the motorbike that has the "forward/turning" control instead of the motorbike, and set the motorbike's vehicle to the dummy. Keep it so that the motorbike, not the dummy, turns backwards for the wheelie, though.[/SIZE][/QUOTE] Thanks for the help,I never even considered that! I'm going to give both options a go and see what happens! :D |
Well that was an absolutely brilliant fix. Cheers!
|
All times are GMT -5. The time now is 06:06 PM. |
Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.