- Home /
Will disabeling a static collider have the same performance hit as moving it?
OK, so I totally get that it's very bad to move a static collider (i.e a collider with no rigid body) since it will cause the Unity engine to recompute a huge internal structure that keeps track of all the colliders ... but, can I disable a collider when the game object it belongs to is removed from the game but I want to still make the game object itself visible but no longer register any collision? (example, a window glass pane).
Will this have the same performance hit?
And if not, could I then move/scale/rotate the gameobject with the collider disabled? I am not intending to ever re-enable the collider after for the remainder of the level.
Thanks, Manny
Answer by MakeCodeNow · Sep 08, 2014 at 04:43 AM
As far as I know, yes, because PhysX will have to rebuild the baked collision data. Even innocuous changes, like setting the parent of the the parent of an object will rebuild the collision, even though the collider data is not changing at all.
Your answer
Follow this Question
Related Questions
Slow Motion Physics Lag Spikes 0 Answers
How do I switch from Character player to Airship Vehicle using triggers? 0 Answers
Copy/Clone collider to other gameobject at runtime 1 Answer
Attaching multiple rigidbodies together and spawnning as prefabs 1 Answer
What is the best way to check is object intersecting? 1 Answer