Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+2)

Try using Physics.OverlapCircle() for your trigger. Overlapping returns a boolean of whether or not something is touching it, meaning that you don't need to use OnTriggerEnter. (NOTE: Use Physics2D if you are in 2D)

You could also try using Vector3 (or 2).right instead of transform.right

Thanks for your answer, I m not familiar with the OverlapCircle so I migth be mistaking but are you telling me to use it because I said my gameObject was empty ?

Because .. Yeah don't know why I didnt talk about it but the GO is parent of another one which has a RigidBody and is responsible of triggering the boxcollider wich set "stopMoving" to true.  So yeah im not sure if you talked about that because of my mistake not mentionning the rigidbody, or if there could be a solution with OverlapCircle. Sorry ... And thanks again