Page 1 of 1

Detect if Character Collides With Static Mesh

Posted: Sat Feb 09, 2013 5:49 pm
by Hadzz
I am using the character controller class from the demo in my game. My levels mainly consist of StaticMeshes and Boxes.

This one level I am working on has a part where you jump across platforms, and if you fall, you land in quicksand. I need to be able to detect if there is a collision between the character (a cylinder) and the quicksand model (a StaticMesh) so I can't switch to a different screen, reset the character, etc.. As you can see below, I can't use a bounding box because the sand angles down into the center.

Image

I know this is probably a newbie question, but any help is much appreciated.

Re: Detect if Character Collides With Static Mesh

Posted: Sat Feb 09, 2013 8:43 pm
by Norbo
The most direct option would be to use collision events. Another option would be to watch the y component of the character body's position, assuming the quicksand is always below a certain height.