how to constrain weapon to hand

ApplisticMonsterApplisticMonster Member Posts: 48
edited November -1 in Working with GS (Mac)
If i had a 2d caracter facing right with a weapon in his hand so if make the weapon a separate actor how to i constrain it to his hand?

Comments

  • svnsvn Member Posts: 445
    You would have to know the exact number of pixels from the center of the actor to its hand. You would also have to constrain two real attributes to the actors X and Y coordinates( call them PlayerX and PlayerY). Then, in the weapon actor, Constrain self.position.X to PlayerX + (distance from player's center to hand) and constrain self.position.Y to the height of the hand.
  • ApplisticMonsterApplisticMonster Member Posts: 48
    So how would i find the exact pixels of the hand? Do i zoom in as much as i can and count or is there another method?
  • andrewm2211andrewm2211 Member Posts: 341
    Nah just punch in your best guess. And preview, and adjust until you get it right
  • brendanzhbrendanzh Member Posts: 19
    my guess is you can make a seperate actor and just put the actor on the hand and see the position of that actor.. lol
Sign In or Register to comment.