Need help sticking actor to rotating actor

TackyAttackTackyAttack Member Posts: 141
edited November -1 in Working with GS (Mac)
So I have a long stick that stays in one position and rotates. I need to constrain a small box actor to the end of that stick, so when the stick rotates the box actor stays on the end.

Here is a picture to explain more:
Image and video hosting by TinyPic

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Does the Stick go in a complete circle? You could fake it by just putting the box in an orbit cycle around the stick at the same speed. Then it would look like it was going with it.

    Look at e orbit thread on the main page for a demo
  • TackyAttackTackyAttack Member Posts: 141
    jonmulcahy said:
    Does the Stick go in a complete circle? You could fake it by just putting the box in an orbit cycle around the stick at the same speed. Then it would look like it was going with it.

    Look at e orbit thread on the main page for a demo

    Yes, it does go in a complete circle. But it stops and goes in both directions at different speeds.
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    I think you could fudge this using orbit. Check out the demo I made last night, it's now on page two. The title has something like math heads, orbit around a point
  • Rob2Rob2 Member Posts: 2,402
    constrain yellow.x to pink.x +((pink.width/2) * (cos (pink.rotation)))
    constrain yellow.y to pink.y +((pink.width/2) * (sin (pink.rotation)))
  • slevslev Member Posts: 99
    rob 2,

    is yellow.x (the yellow actor self.position.x) ?

    is the pink.x an real global attribute called pink ?

    im a bit confused ... cheers
  • Rob2Rob2 Member Posts: 2,402
    Made you a project http://bit.ly/lPIiAn :)
  • old_kipperold_kipper Member Posts: 1,420
    your file won't open in 9.2...
  • Rob2Rob2 Member Posts: 2,402
    one minute
  • Rob2Rob2 Member Posts: 2,402
    http://bit.ly/kMgtFQ sorry about that
  • old_kipperold_kipper Member Posts: 1,420
    cool. thanks!
  • kennedyzakkennedyzak Member Posts: 5
    Is there anyway to make this so there can multiple objects orbiting at different sides?
Sign In or Register to comment.