- Home /
How to make BoxCollider2D not scale
I want to put an image (sprite) onto my game object, but it is not the perfect size. I would like to scale it to fit my box collider but when I use the transform scale it scales everything. I want it to just scale the sprite. How would I do this? Thanks!
Answer by hexagonius · Oct 09, 2015 at 07:58 AM
either change the pixels per unit in the import settings of the sprite, or make the sprite a child gameobject of the collider so it can be independently scaled.
Answer by GiyomuGames · Oct 09, 2015 at 08:44 AM
You can rescale the box collider after you have finished scaling your sprite by modifying the center and size parameters.
Your answer
Follow this Question
Related Questions
changing camera view 3 Answers
Problem scaling parent without scaling child 0 Answers
GUI box scaling issue [C#] 0 Answers
Is this the correct way to scale my GUI? 1 Answer
My prefab is applying scale changes when hitting apply 1 Answer