Question by
Guppy · Jul 18, 2017 at 06:37 AM ·
mayaprimitivesunsupported
Physics.Raycast is returning an error, is there a way around this??
What I am trying to accomplish, is use a Physics.Raycast(Origin, Direction, maxDistance, layermask) to detect the ground and allow jumping if on the ground.
This is the error I am getting when I use this on my current level model:
Failed to extract collision data: Submesh 0 uses unsupported primitive type "Quads". Please use either "TriangleStrip" or "Triangles". Please make sure you have unchecked "Keep Quads" on your model's Import Settings
Is there a way around this WITHOUT modifying the level model that was made in Maya? I don't want to have to remake the level model. Also, I have not tried re-importing with the settings that the error code says I should do.
Comment
"I have not tried re-importing with the settings that the error code says I should do." Why haven't you? The error message is literally telling you that's the problem!
Answer by Diukrone · Dec 26, 2017 at 01:42 PM
You are using a plane. Remove the plane and put a cube, resize it and it could be solved easy. Another way is GetTriangles().
Loading FBX files can happens some bugs, so change to load it as OBJ, it can solve the problem also.