Hello Guest

Author Topic: A way to get current frame size?  (Read 3627 times)

LordYabo

  • Newbie
  • *
  • Posts: 17
    • View Profile
A way to get current frame size?
« on: July 29, 2013, 10:42:45 pm »
I have two objects: a player and a door.  The player can be differently sized based on player type chosen.  I want to know the size difference between the player and the door at run time so I can do some appropriate calulations.

Is this even possible to get access to the current animation's current frame's source size?

My player object and door object have scales of 1,1,1 on an ortho camera so knowing the GO  size doesn't help me.




« Last Edit: July 29, 2013, 10:44:57 pm by LordYabo »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: A way to get current frame size?
« Reply #1 on: July 29, 2013, 11:08:15 pm »
sprite.GetBounds gives you the physical bounds of a sprite.

LordYabo

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: A way to get current frame size?
« Reply #2 on: July 29, 2013, 11:10:27 pm »
Thanks! ;D