A
A
almore2016-04-09 14:01:37
Game development
almore, 2016-04-09 14:01:37

How to optimize animations?

Good day to all.
I have a game object in the scene with a rigidbody2d that has isKinematic checked, and also a collider with isTrigger checked. Its transform is controlled by the animator. cfb77547543743c3bc9ddc6dbb0e258e.png
If you add, for example, 20 such objects to the scene, you can observe the following picture: 6d3242e724804c86ac6aa55a7268dc9e.jpg
If you turn off their animator or collider, we get: 53c72e2efef240828aefc1ebbda6d3b2.jpg
Google says that the point is that the collider is constantly recreated during animation, since the animator affects the object through transform.
Actually, how should the object be configured correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2016-04-09
@almore

1) Try to simplify the shape of the collider - make it a box, not a polygon
2) Colliders are unlikely to be recreated - just update the physics.
3) Set up physics layers - who should trigger collisions with what.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question