Problem with wall collision

Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines

Moderators: jesterKing, stiv

felipecb
Posts: 2
Joined: Wed Feb 24, 2010 11:15 pm

Problem with wall collision

Hello, guys,

I'm creating a game using the Game Engine, and I'm creating it's basic mechanics first. It's a dynamic model moving/jumping in a room with walls and a "stair"... the model is moving using linear velocity.

I'm facing a problem now and I'm not sure how I could solve it, or at least the best way to. When I move towards a wall, in the air (after jumping), the character gets stuck as if gravity isn't working.

My initial solution was to check collision with a property included in the wall, and don't let the char move if this collision existed and he was in the air. This, though, just worked for walls, but not for any other model... I could use the same property on every existing model, but then I would have the problem of not being able to walk when standing on it.

Something that worked was to divide the model in two parts - the one where the player could just stand on, and the one where he couldn't stand but could collide with. But this really isn't a nice nor practical solution.

I think the ideal solution was to discover what's wrong with my game mechanics that makes the character get stuck when walking towards a wall, so a solution that would work for any situation could be found.

So, I'd like to know if anyone has any idea on how to solve this, or at least on what's happening with the wall collision. Here's a link to the .blend, where the problem is fixed on the wall, but it still happens in the "stair" in the scene.
http://rapidshare.com/files/355382595/wtf.rar.html

Cheers.

redrummurder62
Posts: 4
Joined: Tue Jan 10, 2012 5:48 pm
Location: Bay City
You are doing everything right, if you are just using a usual character rigging then all you should need is to add the collision in the characters properties, if that does not work then duplicate the character mesh and scale it a bit larger, then parent the two meshes. After this just add a visibility property to the outer mesh and you should have no problem.