Collision Detection + own Handling

Christian

20-11-2008 10:29:44

Hello,

I´ve tried now a few things with Newton, but I didn´t find out how to do the following best.

I have two teams of players with the same materialId and a floor with an own materialId. At the moment I can move one of the players and create Collisions between Players that way. I have a CollisionCallback Class registered for Collisions between player-materials.

Now I want that the Players don´t collide any more, but instead stop near each other even when I continue to make them move into each other (the player I move should just stop near the other player he is going to collide with, but it should still be possible to move away in an other direction)

Do Newton or Ogre have anything to detect, if an other objekt is very near and if its in front/back/side of the calling object ?

Thank you for your Help

Christian

24-11-2008 15:49:15

any ideas?

I want my player to stop in front of the other player instead of colliding with it or moving through it. All in all I want to use Newton only as collision detection but not for computing the collision. I know how I can prevent the collision computing but then my Player moves through the other players. Setting the Movement Force to Zero doesn´t seem to work either.

I think I need something like a rayscan to look if there is something in front of my player and only move if theres no other player, but that seems not like a good solution to me.

Is it possible to set Physic settings for Player Player collisions in a way so the players won´t bounce around and fall to the floor or whatever when they collide ?

micken

28-11-2008 02:05:34

You could just use a really big box as a collision for your players, that way they'll stop when they get close enough to eachother. or some kind of cylinder.