About rotate actor
hi guys, so i have problems when actor(x) rotate around another actor(y) which rotate around itself in ad-hoc. When I stop games and play the postion actor(x) around the actor(y) change .how i can fix that?
Comments
You say your actor(x) is rotating around actor(y) , then you 'go out from the game' and 'come back to it' and you actor(x) position is changed ?
Changed how? does it stop rotating around actor(y)? please be more specific ..
Also what rule you use for the rotation?
...
1- actor(y) rotate about itself by use rotate rule.
2- actor(x) rotate about actor(y) by using :
(Constrain the actor's X position to . . . AAA*cos(self.time*BBB)+CCC
Constrain the actor's Y position to . . . AAA*sin(self.time*BBB)+CCC
AAA = the radius of the orbit.
BBB = how fast it moves.
CCC = the centre of the orbit.)
3- I need actor(x) to rotate about actor(y) by same rotate speed of actor(y) about itself. So, the actor(x) will be in fix postion around actor(y) when actor(y) rotate.
4-the problems is the postion of actor(x) changed when Out from the game and come back
(if you just said the word "sync" i would probably understand it earlier
So what i suggest is to use GAME.TIME instead of Self.Time in your actor(x)
As for actor(y) , replace the "rotate behavior" with
Constrain self.rotation TO Game.time*DDD
DDD- a number - you need to make some tests to find the right number to sync with your actor(x) but maybe (just maybe) your BBB value will do it
if you describe what you trying to do maybe ill be able to be more helpful .
In your equations , you need to add an extra to the "Game.time"
Constrain the actor's X position to . . . AAA*cos((game.time+0.2)*BBB)+CCC
Constrain the actor's Y position to . . . AAA*sin((game.time+0.2)*BBB)+CCC
Each gear will have to have a different "extra" value .
My suggestion is to make a self.attribute - real - call it "my offset"
Now make your equations like this :
Constrain the actor's X position to . . . AAA*cos((game.time+"self.my offset")*BBB)+CCC
And in each instance (each teeth) give "self.my offset" a different value .