- Home /
How to make a box collider wok with rotated cube?
I have a rotated cube mesh that i want to add a box collider to. It was rotated outside of unity, so the rotation in unity is 0,0,0, but the cube is not 'upright'. Is there a way for unity to work out how to add the box collider on correctly with the proper rotation, and do it automatically as i have many instances of these cubes, all with different rotations, so manually rotating the box mesh is not an option? A unity asset would also be fine if there is one!
Thanks
I don't think you can rotate a boxcollider in anyway, use a polygon collider ins$$anonymous$$d?
The issue is i have many (hundreds, possibly thousands) of these cubes all with rigidbodies and moving at the same time. The game will lag if i use mesh colliders, but not if i use box colliders.
simple cube? are you kidding? make new one in unity. or open your mesh in some external mesh editor and fix weird rotation... you can resolve it in unity actually. put your cume inside empty object, rotate it inside to align with all global axis, add box collider to the parent game object, save the whole thing as prefab.
Your answer
Follow this Question
Related Questions
Whats the best colider to use for my race track? 0 Answers
Polybrush is not updating the mesh collider? 2 Answers
GPU Generated Mesh? 3 Answers
Stop the player at center of cube mesh 2 Answers
Simple mesh height alteration. 1 Answer