Jump to content
  • Advertisement
Sign in to follow this  
mv348

Human Character Bounding Volume - what shape to use?

This topic is 2513 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

b_volume.jpg
Still a novice here so pardon me if this is a silly question.

I'm trying to decide what bounding volume would be best for collision detection between the game characters and immovable scenery. (Walls, floors, etc)

The above image is my best idea so far. A "capsule" that's just a circular cyllinder with two spherical caps. For collisions with the cyllinder, the contact normal will be point outward, paralell to the ground. Collisions with the spheres that our outside of the cyllinder will point away from the center of the sphere.

I considered using just a rectangular bounding box but I feel as if this would have a tendency to get caught on other sharp objects. I feel this could also avoid the character looking like its hovering, or sinking into the ground, when moving over sloped surfaces.

I do think this could potentially cause the character to slide off a narrow platform, but I think with the appropriate friction this may not be an issue.

Anyone approve or disapprove of this approach? I'm not sure what the classic approach is for human characters.

Share this post


Link to post
Share on other sites
Advertisement
Does anyone have a comment? I just want some input before I go ahead and try to set this up

Share this post


Link to post
Share on other sites
A capsule like that is pretty standard - for example, Unity's default character controller. As you say, the lack of sharp corners makes it much less prone to hanging up on edges.

Share this post


Link to post
Share on other sites
We use capsules as well, works good, as long as you remember to constrain the capsule to always stay upright so that the physics engine doesn't try to tip it over.

Share this post


Link to post
Share on other sites
We use a capsule, but it is raised slightly off the ground. Anything that touches it stops the character. We use a long ray cast through the center to detect the ground height and step ups. It seems to be working pretty well. This for important characters only.

Unimportant characters can use any one shape they want. Our editor lets you position a variety of shapes relative to the character and to choose that as collision.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!