For those of use that don't speak french.
Alinor:
In fact such as whether a character is in front of a wall, I intended to use a cube "ghost" and make him adopt different positions around the character by making every time a crash test to define the best environment.
The problem is that I feel that if we make a crash test, which moves the cube and just after we redo another crash test, the second test would return the same value as the first, and I wondered if updateSimulation () would solve my problem.
anael:
The cube ghost does not come into collision with the character?
For example, the box "Feet" in YoFrankie example, it detects the collision with the ground if the number of collisions is greater than 1 because the box also comes into collision with the Player.
int nbCollision = physics->isObjectInCollision(phyProps->getCollisionObjectId());
updateSimulation () must be called by the class in MGame update () as the default.
Alinor:
I think solving this problem, either by avoiding the cube to get through the character, or by using
isObjectsCollision (phyPropsCube-> getCollisionObjectId (), phyPropsPerso-> getCollisionObjectId ())
and decrement of 1 if true to return to my problem of pathfinding, if such a wall is (4,0,0) before the character (0,0,0), the cube next to a standard one would.
int TABCollision [10];
cube->setPosition(1,0,0);
TABCollision [0] = physics->isObjectInCollision(phyPropsCube->getCollisionObjectId());
cube->setPosition(2,0,0);
TABCollision [1] = physics->isObjectInCollision(phyPropsCube->getCollisionObjectId());
cube->setPosition(3,0,0);
TABCollision [2] = physics->isObjectInCollision(phyPropsCube->getCollisionObjectId());
cube->setPosition(4,0,0);
TABCollision [3] = physics->isObjectInCollision(phyPropsCube->getCollisionObjectId());
Does the table contain the value TABCollision 0,0,0,1 (1,0,0,1 put if the character is counted in the first collision)?
Last edited by zester (2012-01-18 11:37:41)