precise character collision ?

anyone knows how to make character collide precisely?
like in BGE we parent object and armature to a box it result in some nasty results
if character is in front of wall it kicks inside the wall or if it’s in animation like crouching collision bounds remains same

anyone know how to fix without ragdolls?:confused:

Ragdolls have little to do with solving player collision.

You fix it by having the collider appropriate size. This solution is how it is done on pretty much all games and feet going through walls is not an uncommon problem.

For crouching you have couple alternatives which you can find more information on if you search the forum. One solution is to use dynamic object for top part collider that moves down when you crouch. You set this in different collision group than the actual player collider so they can overlap.

actually i can even make scaling animations as actions for the box and assign them with actions of players but that’s tricky :rolleyes:
and i am very lazy though…

i’ve an adea to fix kicks in wall as i can assign a rey senser in -y direction which will tell armature if there’s a wall in front of him and will play standing animation or something else

but i need precise collisions for a game with lots of animations of flipping,vaulting and stuff like that

That would be bad. The player could accidentally squeeze into too tight spaces when the scale is smaller and when the scale rises and the collider doesn’t fit into the space anymore the physics would go crazy.

Besides I’m not sure the scaling even affects/updates the collider shape when the game is running.

but i need precise collisions for a game with lots of animations of flipping,vaulting and stuff like that

Collisions are accurate. In game design you need to take into consideration how you would make something like that work, because you can’t simulate per animation / per limb.

Found this a while back, you might find it useful.

thanks Kheeor and theraulant for wasting time on me now i understood that

If your question was answered then it wasn’t a waste of time :slight_smile:

Several remarks about this setup:

  1. Shouldn’t the collision box be Dynamic? In the example it is Static Ghost, so is it just for sensory purposes?
  2. The collision box is a Triangle Mesh because only Triangle Meshes can be updated. But Triangle Mesh is not suitable for Dynamic objects, there’s a bug in Bullet.

Maybe I’m missing something but I wonder how this setup works.

Edit: I now understand the concept of a ‘hitbox’ is for sensory purposes only, so I don’t think this is what KASHI$H is looking for.

On the subject. I don’t think you need precise collision to achieve realism. For example, don’t want the character’s legs going through walls? Just don’t walk into walls, or when you do, make sure the character stops/crashes/pushes off. Use sensors on your character to detect which situation is at hand, and anticipate. When the character gets squashed by lets say a giant hammer, then squash the character before it’s even hit.