Replies: 2 comments
-
|
A sphere against a triangle mesh should just work. Have you looked at the tri mesh? Does it contain slivers (very long, very thin triangles)? Perhaps some of the triangles are back facing? Are you only looking at 'mFraction' in this case to see if the sphere passed through or not? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Closing this as it was a user error in vector math finding the starting position of the cast. Works fine. Thank you for the reply! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using a sphere cast to check if there is an obstacle between the camera and a character, so it is not blocked by a nearby wall or something. The map is a medium sized one, think a pvp shooter map size, like counter strike. The walls collision mesh is a single trimesh. The issue is that the shapecast sometimes does not detect a wall, which makes the camera go through a wall. I can't seem to find a pattern, like a certain angle or a triangle size vs the sphere radius. Not sure what is causing it. Any ideas or suggestions? Maybe there is some setting that could improve the sweep hit detection against the trimesh?
Beta Was this translation helpful? Give feedback.
All reactions