help with position of actor
UtopianGames
Member Posts: 5,692
Hi Guys,
A little pissed because i would expect to know how to do this by now but been going round in circles for a few hours and thought i'd see if any pros here have a solution.
http://gamesalad.com/game/play/40442
I have everything setup except the lightsabers position (i want it so its handle is on the outside of the circle)
I have tried cos and sin and god knows a lot more :P but can't for the life of me fix it.
Thanks for looking.
Darren.
A little pissed because i would expect to know how to do this by now but been going round in circles for a few hours and thought i'd see if any pros here have a solution.
http://gamesalad.com/game/play/40442
I have everything setup except the lightsabers position (i want it so its handle is on the outside of the circle)
I have tried cos and sin and god knows a lot more :P but can't for the life of me fix it.
Thanks for looking.
Darren.
Comments
`
r = Radius of the circle
t = Time (which increments)
c = Some constant that makes the change in time look more dramatic. In this case, the higher the number, the faster the object moves on the circle path.
X0 = X position of the center of the circle
Y0 = Y position of the center of the circle
X = r*cos(t*c)+X0
Y = r*sin(t*c)+Y0
`
Yeah i tried code exactly the same as the chainsaw but this one is using codemonkeys twin joystick demo.
I have it rotating correctly but can't work out the offset position required.
I can w8 till you have time bud as i'm sure your the man for the job.
Regards,
Darren.
http://gamesalad.com/game/play/40513
Good luck!
Thanks for remembering!
Darren.
I must be going mad.....tried so many things after i thought i tried what you did 1st but i must of got the code slightly wrong.
Big thank you (again) works exactly how i want it to....even though i feel like an idiot now lol.
Cheers m8.
Darren.