Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

guys this is my first jam and i am encountering a weird problem

A topic by AhmedDaDevDude created Jan 23, 2021 Views: 269 Replies: 5
Viewing posts 1 to 3
(1 edit)

from my player mechanics is scale up when hes angry and when i try adjusting the scale through code my player's collider is kinda destroyed

and the player falls off plz someone help me

its 2d or 3d? unity or something else?

no its 2D

so basiclly, you have to stretch your collider too, and probably if you got origin set on the bottom, you have to change your Y-position too

Make sure the object has a starting scale of 1 in xyz. Then you should be able to scale it with gameObject.transform.localScale += new Vector3(1, 0, 1); for example. If the collider is still destroyed, could you explain what exactly happens when you scale the player?

thanks everyone i managed to fix the problem so yeah thanks for your useful and fast replies

looks like i was trying to multiply my localscale  with my desired value(new vector) and when i tried to add them things went just right...

and thanks again for your replies...