help with position of actor

UtopianGamesUtopianGames Member Posts: 5,692
edited November -1 in Working with GS (Mac)
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.

Comments

  • rebumprebump Member Posts: 1,058
    I'm on a PC at my day job otherwise I'd take a look. And not really being able to see what is going on, assuming a lightsabre being 'held' by a circle? Kind of like the chainsaw demo? Did you change the sin/cos distance parameter?

    `
    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
    `
  • UtopianGamesUtopianGames Member Posts: 5,692
    Hi rebump,

    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.
  • rebumprebump Member Posts: 1,058
    About all I have time for at the moment:

    http://gamesalad.com/game/play/40513

    Good luck!
  • UtopianGamesUtopianGames Member Posts: 5,692
    Will take a look now m8 (just woke up and time zones are differnt)

    Thanks for remembering!

    Darren.
  • UtopianGamesUtopianGames Member Posts: 5,692
    OMG i could swear i tried that !

    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.
Sign In or Register to comment.