sprite size

magioicecreamomagioicecreamo Member Posts: 2
hi , i am new with GS , i just have one week with it.
i made a background and a squirrel sprite , as you can see in the image -->> http://dl.dropbox.com/u/26527420/todo lo demas/Sample 2 BUG.png

my squirrel is floating because the tail is included in the square size of the image and is colliding with the wood box.
so how you deal with that stuff?

Best Answers

  • PhoticsPhotics Posts: 4,172
    Accepted Answer
    You could try using a circle as your collision shape...
    ...or you could try making the tail a separate actor and constrain its position relative to the main squirrel body.
  • tatiangtatiang Posts: 11,949
    edited April 2012 Accepted Answer
    You can make the tail a separate actor and constrain it to the location (+/- an offset value) of the squirrel's body. In the body actor, have it broadcast it's position by constraining game.squirrelX (real) to self.position.X and game.squirrelY to self.position.Y. In the tail, do the opposite and constrain self.position.X to game.squirrelX-20 (or however far to the left you need it) and self.position.Y to game.squirrelY+5 (again, change the offset to whatever you need). Only the body actor should have any collide rules. The tail just comes along for the ride!

    Edit: sorry, didn't see Photics' answer until I posted.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • GraphicWarehouseGraphicWarehouse Posts: 927
    Accepted Answer
    welcome to gamesalad!

Answers

Sign In or Register to comment.