Rotate pinball paddle not working?
jermerqua
Member Posts: 17
So i am trying to create a simple Pinball game. I have a Paddle at the bottom to hit the ball so it can not pass. I simply want the user to click the space bar (down) to rotate it so that it can hit the ball and lift up on space bar to return the paddle to it's original state. I set 2 rules
Rule1
On key (spacebar is down)
Rotate angle (45%, speed = 900, relative to actor, stop on destination)
Rule 2
On key (spacebar is up)
Rotate angle (45%, speed = 0, relative to actor, stop on destination)
The first rule works but when I release the spacebar the paddle does not return to it's original position. Any ideas why? Work arounds? Seems so simple.
Rule1
On key (spacebar is down)
Rotate angle (45%, speed = 900, relative to actor, stop on destination)
Rule 2
On key (spacebar is up)
Rotate angle (45%, speed = 0, relative to actor, stop on destination)
The first rule works but when I release the spacebar the paddle does not return to it's original position. Any ideas why? Work arounds? Seems so simple.
Comments
just checked both "run to completion" & "stop at destination" and still not working. I have the most stripped down bare bones file too. This is this is the only thing i am trying to do in this file I am using. Argg!
I turned off Moveable in the paddle asset, because I didn't want it affected by gravity, which completely disabled it from rotating.
I tried placing the "rotate to angle" in the "otherwise" portion of teh rule and still no go.
SO the paddle HAS TO BE affected by gravity and is a pain to get to rotate to-and-fro.
Change the angle of rotation to be "relative to: scene" vs "relative to: actor"... makes complete sense. Once you rotate the actor to 45 degrees (if relative to:actor) it then resets it's angle to 0 degrees after rotation so while it is infact working when I release the spacebar and it set's the angle to 0 degrees it just so happens that it's already at 0 degrees.
1) place paddle on stage, add ball, add gravity
2) add collide to ball and set to collide with paddle
3) uncheck moveable and ball bounces off paddle perfectly
4) check moveable but at a "constrain attribute" and set a constent X and Y THEN the ball simply slows down when it hits the paddle and proceeds to pass right through
for some apparent reason the "constrain attribute" has an affect on the objects ability to collide.
Crazy :-) I will try working with acceleration over gravity but your siggestion is right on and infact where I went to instinctively which is too look immediately for the "not affected by gravity" chekc mark.