How to make the actor rotate from corner
Hi mates
Please what is the way for the actor to be rotated from the corner rather than use transparent?
Please what is the way for the actor to be rotated from the corner rather than use transparent?
Comments
Thanks for your reply
I really found that UtopianGame did it in his game bumps.
I hope that he tells us how he did it.
______________________________________________
http://www.gamesaladforum.com/
Add to landscape scene:
white square actor size width 75, height 75
rotate manually to 45 degrees
Add behavior Constrain Attribute
constrain attribute: self.Position.X To: 40*cos(self.Time*180%360)+240
Add behavior Constrain Atrribute
constrain attribute: self.Position.Y To: 40*sin(self.Time*180%360)+160
Add Rotate Behavior
direction: Counter Clockwise
speed: 180
The 240 and 160 in the above constrains are the (x,y) center of rotation and can be moved with everything still rotating at the "corner".
Refer also to "How do I make an actor move in a perfect circle?" in GameSalad's How To section for more on the variables.
Hdeanda I tried your example ,but it still rotate from the middle.Please can you do it and send attachment?
please check the UtopianGame "bumps" . I bought the game for checking this . It works .
tshirtbooth if I use transparent will the actor hit the ball also if the ball collide with the transparent side or not . If yes this is not happened with the UtopianGame bumps.
1. Make your actor rotate normally from center.
2. Make your actor move in a circle (http://gamesalad.com/wiki/how_tos:gsc_circular_movement) with a radius of 1/2 the actor's diagonal length (use pythagorean's theorm) and make it move at the same speed it's rotating at (you'll have to tweak it)
I'll try making a demo.
Asymptoteell
http://gamesalad.com/ontheappstore/22704
Hope it helps.
Asymptoteell
yet another bit of proof anything can be done with math. Man I wish I didn't sleep/skip trig both times I took it in High School.
Great work Asymptoteell
I got your demo by searching the name in GameSalads Dashboard.
Great Gob ... Thanks really very much.
calvin9403
thanks for clarification