- Home /
Physics Collision Only Seems to Affect Moving Objects
I am programmatically expanding the transform.localScale of a sphere in order to push back approaching zombie enemies, but the physics engine only seems to be applying force when the zombies are moving. I've confirmed that the zombies have a rigidbody and capsule collider, the sphere has a sphere collider, nothing is marked static, and their layers are set to interact in the collision matrix.
I've attached a .gif of the issue. You can see at the beginning that the zombies already huddled around the white sphere aren't affected by the expanding transparent blue sphere, but the ones still moving in get pushed back by it. The additional knockback after the transparent sphere destroys itself is a function called on all enemies added to a list in OnCollisionEnter.
https://gyazo.com/4cfbfdfab12099fa86e1e9b4d82e2421
The blue transparent sphere's physics aren't affecting the stationary zombie nor calling OnCollisionEnter on them. How do I fix that?
Your answer
![](https://koobas.hobune.stream/wayback/20220612165815im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
OnCollisionEnter inside FixedUpdate? 1 Answer
Don't understand why this on collision script doesn't work. 2 Answers
Need second pair of eyes: rigidbodies with colliders not firing OnCollisionEnter yet again... 1 Answer
OnCollisionEnter not called. 1 Answer
Changing transform.localScale but OnCollisionEnter isn't executed 1 Answer