Rotate Point
brunoocasali@gmail.com
Member Posts: 20
1° Sorry the terrible english, I'm Brazilian!
How make to create one point in on actor for use the "rotate, rotate to" ,
I don't want use the central point what the created, but yes one different...
thanks!
How make to create one point in on actor for use the "rotate, rotate to" ,
I don't want use the central point what the created, but yes one different...
thanks!
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
http://forums.gamesalad.com/discussion/comment/370605/#Comment_370605
https://www.box.com/s/1l18a81la5te323dlf4o
Constrain X to 36.5*sin( game.Time *150)+AAA
Constrain Y to 36.5*cos( game.Time *150)+BBB
Rotate / clockwise /speed 150
AAA = wherever you want the centre of the clock arm to be in the X axis.
BBB = wherever you want the centre of the clock arm to be in the Y axis.
"Socks" I have to use only your answer or use with answer of the "RThurman"?
Another trick to make things simple is to make the background to your 'clock hand' (I guess it's a clock hand) twice as long - with the clock hand down at one end - like this you can use a simple rotate behaviour.
I hope that makes sense !
I try to use only your answer, I can only the night. After test I post to result
and yes it seems with "clock hand"!! kkkkkk
Here you go, a quick demo:
http://www.mediafire.com/?18rjqung6lcu2it
https://www.box.com/s/fay0h9ucvka6yoszuq5b
I'll just change the image and is the end Thank you!!
https://www.box.com/s/lkmohcwh5l4i1ya0pvh4
I don't know what "I think I got kkkkk" means ?
Well your English is better than my Portuguese !
But I don't really understand your question : (
I made you a demo above.
In the demo the image rotates around the white point ?
Bruno, this is what @Socks gave you:
--Constrain Attribute: self.Position.X To: 35.5*sin(game.Time*150)+200
--Constrain Attribute: self.Posiiton.Y To: 35.5*cos(game.Time*150)+150
Bruno this is what you did:
--Constrain Attribute: self.Position.X To: 35.5*sin(self.offSetX*150)+200
--Constrain Attribute: self.Posiiton.Y To: 35.5*cos(self.offSetY*150)+150
Do you see the difference?
the two examples
https://www.box.com/s/jtacslsfbmj14bhkz74m
notRotate2 : game.Time
notRotatee : offSet's
i want to rotate around the white point!!
The first number needs to be the distance between the center of the actor and the point you want to rotate. The actor in your example is about 110 pixels tall. So the number would need to be around 55.
Next, the rotation speed will always need to be the same as the "speed" multiplier. (If it is game.Time*150, then you need to set the rotation speed to 150.)
So the behaviors are:
Constrain Attribute: self.Position.X To: 55*sin(game.Time*150)+200
Constrain Attribute: self.Posiiton.Y To: 55*cos(game.Time*150)+150
Rotate (clockwise) Speed:150
I want to rotate about the white point
It would be as if he had a nail in place of the white point
So it seems that it creates a circle around him and rotate
Do you want your image to do this . . . ?