Hello Guest

Author Topic: Rotate tk2dSprite and not its collider  (Read 3848 times)

Lavaflyer

  • Newbie
  • *
  • Posts: 9
    • View Profile
Rotate tk2dSprite and not its collider
« on: January 27, 2014, 12:11:34 am »
Does anyone know if there is a way to rotate a tk2dsprite (the image) and not rotate its 2dboxcollider.  I'd rather not have to create several png files of one sprite at different angles and I was hoping that there is a way to do this in unity or through scripting.  Anyone got any ideas, thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Rotate tk2dSprite and not its collider
« Reply #1 on: January 27, 2014, 12:35:33 pm »
The easiest way is to simply not create the collider with the sprite but rather create it yourself as a separate game object. You can attach the sprite to the game object, so rotating the sprite will not rotate the collider.