Help - Offset Rotate without time constraints?
supafly129
Member Posts: 454
I'm trying to get an actor to rotate 90 degrees along a fixed point, but only when it is pressed. I know @Socks and @RThurman were nice enough to cover this kind of stuff in the forums numerous times, and attached/below is an example courtesy of @Socks similar to want to achieve, I just cant get it to work the way I want since all of the demos I've downloaded involve constraints to timers and substituting it for a custom integer attribute didnt work (I do not want it to constantly rotate). Any ideas?
http://www.mediafire.com/download/18rjqung6lcu2it/rotateX.zip
Comments
Will this work for you?
@RThurman Not quite, I'm trying to get the actor to rotate an additional 90 degrees every time "touch is pressed" as in the following example. The only difference is I want the white dot to stay in place like the image I posted above (so that the actor rotates from a fixed point).
Updated Game Project - [DOWNLOAD]
POLAR ROLLOUT (New Line-Drawing Physics Puzzler!) - FREE Download
Not at my computer right now, so can't look at your file, but can't you simply use a value for the angle that interpolates through a value of 90 when you press it ?
Example file attached, click on the screen to rotate . .
Excellent !!
Maybe something like this?
Im not very good with all this maths and angles and stuff, so i just double the image length and make the other half invisible so that it rotates on the middle (aka where the end of the visible image is). At least thats the method im using. Would be nice if GS released movable rotation anchor points.
@MarpCark Yeah my only issue would be that if another actor collides with the invisible part, it would still trigger my rules but thanks for your input!
@Socks @RThurman thank you both for your help! This is exactly what I was trying to do i really need to brush up on my trig!
POLAR ROLLOUT (New Line-Drawing Physics Puzzler!) - FREE Download
Right back atcha' good buddy!
I agree. That is a tried and true method for making the rotation point come out just right. (I probably use the method you describe more than any other solution.)
You are welcome! You don't really need to study trig to use this. Its all set up, all you need to do is change the 'pivot point' coordinates to whatever you want and the move behavior will always do the rest for you. In your case, the pivot point is 0,-35.5. You could change those coordinates to any other pivot point, and it will pivot around the new set of coordinates without you needing to make any other changes.
You can also use any other rotation method, all of them work with this setup.