Unity: my object’s physics doesn’t work ? why ?

Hi,

I stumbled onto this issue and solved it.

So, I had a 3D object with a collider on it and it was not acting as a collider.

I had a script on that object which animates its movement through transform.lerp in a update funtion

Why was the physics not working ?

It is because if you update the object’s position on each frame though functions like transform.lerp, it bypasses the unity’s physics calculations on that object (even the child objects attached to it) and hence no physics works on it. So, I ended up using a character controller on it.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: