I want this actor to stay fixed to almost the edge of the corner of the other actor, my file is shown in the video video here:
![](https://img.youtube.com/vi/gE94VqYzA58/0.jpg)
I have used an attribute to keep the position x and y (+ a bit to get in corner) & rotation to big box
How do I do this?
Cheers
Max
Answers
from the original 2 equations...
self.position.x = game.sceneX+magnitude(self.offsetX ,self.offsetY)*cos( self.Rotation )
self.position.y = game.sceneY+magnitude(self.offsetX ,self.offsetY)*sin( self.Rotation )
I thought this...
game.sceneX was for the location of the big square actor's X position
self.offsetX was the offset in x direction from centre of big square
* i assume is multiply
and mine didn't work out quite right...
did i do it right?
Many thanks
Max
Cheers uptimistik, I would have never worked out what to type into google anyhow!
After some very kind help from uptimistik, he deduced that the formula needed to be:
game.Win lvl box-pos.x +magnitude( self.offsetX , self.offsetY )*sin(( self.Rotation )-atan( self.offsetX / self.offsetY ))
game.Win lvl box-pos.y -magnitude( self.offsetX , self.offsetY )*cos(( self.Rotation )-atan( self.offsetX / self.offsetY ))
Thanks again to uptimistik, I recommend everyone to check him out
http://www.mediafire.com/download.php?nc9rawgb9y3yn5z
Cheers
Max