- Home /
Is there a cheap way to flip a collider´s normals in real time?
I'm using a double-sided mesh collider, that is, 2 identical colliders with opposing normals.
One of these meshes is also animated using the Tagarela shapekey editor. (The other mesh doesn't have a renderer at all.)
Every frame, I reset the the mesh collider to match the new shape of the mesh filter, in order to keep the collider the same shape as the mesh being visually animated.
Obviously this is slow, and I can only get away with resetting about 700 vertices without slowing things down too much.
The questions comes about because the other mesh (with the opposing normals) also needs to be adjusted in the same way, chopping that 700 down to 350. I'm wondering if there's a way to just give both colliders exactly the same mesh, then flip all the normals of one of them in a hopefully inexpensive manner.
Your answer
Follow this Question
Related Questions
Seeing through mesh 1 Answer
Detail mesh normals sometimes flipped inside. 0 Answers
[Particles] Restrict particles inside a Mesh 1 Answer
Detecting Mesh and Saving it 1 Answer
Getting bounds of submeshes 1 Answer