I need to ger OnTriggerEnter2D call from any of the two gameobjects in my setup , however I’m not sure what should be the best setup for this?
MySetup ( not sure if this is best for performance) :
Gameobject A: Components: CircleCollider2D(isTrigger Enabled), Rigidbody2D(isKinematic Enabled), TriggerHandlerScript( OnTriggerEnter2D is defined here)
Gameobject B: Components: CircleCollider2D(isTrigger Enabled)
both GameObject A & B are continuously moving.
I found in unity documentation about static colliders: StaticColliders which says Static colliders should not be moved and If you do change a static collider then this will result in extra internal recomputation by the physics engine which causes a major drop in performance.
However I’m using unity 5 which says : Moving Static Colliders will be a lot less expensive Unity5Blog
Please let me know best setup , should I use rigidbody on both gameobject or remove both of them as I don’t need physics in my game?