Pinball game problems
by Tom Feni · in Torque Game Builder · 07/25/2005 (3:20 pm) · 4 replies
Ok moved to here...
I am looking for help.. :)
my game is going ok but I am having trouble with the paddle collision.. so I was wondering if someone could take a look and see why the ball is going thru the paddle.. its basically popping under the paddle when it collides..
really odd..
link to the game..
Pinball Game
I am looking for help.. :)
my game is going ok but I am having trouble with the paddle collision.. so I was wondering if someone could take a look and see why the ball is going thru the paddle.. its basically popping under the paddle when it collides..
really odd..
link to the game..
Pinball Game
About the author
#2
otherwise it now works exactly how it should.. :)
07/25/2005 (5:39 pm)
Well using his code I got it working.. but the paddles dont reset.. not a biggy but I am sure with a reset schedule I can fix it :)otherwise it now works exactly how it should.. :)
#3
07/26/2005 (7:07 am)
Couldn't you use the key up event to trigger the paddle going back to its original loction?
#4
01/16/2011 (5:49 am)
### Link broken ###
Torque Owner Joshua Spencer
function paddleLeft() { // Set the player moving up. $paddleLeft.setRotation(-35); $paddleLeft.setAngularVelocity(360); $paddleLeft.setAngularVelocity(0); }setRotation instantly changes the angle of the object so that it's suddenly 'above' the current ball position, which then forces the ball to go down.
What you need to do is just use 'setAngularVelocity' or 'setAngularForce'. Unfortunatly T2D doesn't currently have rotation limits, so you'll need to create some objects that ONLY collide with the paddles to stop them at the maximum and minimum angles