Hey Leute,
Mein Problem liegt bei der genannten Funktion in ISceneCollisionManager.h:
Code:
//! Collides a moving ellipsoid with a 3d world with gravity and returns the resulting new position of the ellipsoid.
/** This can be used for moving a character in a 3d world: The
character will slide at walls and is able to walk up stairs.
The method used how to calculate the collision result position
is based on the paper "Improved Collision detection and
Response" by Kasper Fauerby.
\param selector: TriangleSelector containing the triangles of
the world. It can be created for example using
ISceneManager::createTriangleSelector() or
ISceneManager::createTriangleOctreeSelector().
\param ellipsoidPosition: Position of the ellipsoid.
\param ellipsoidRadius: Radius of the ellipsoid.
\param ellipsoidDirectionAndSpeed: Direction and speed of the
movement of the ellipsoid.
\param triout: Optional parameter where the last triangle
causing a collision is stored, if there is a collision.
\param hitPosition: Return value for the position of the collision
\param outFalling: Is set to true if the ellipsoid is falling
down, caused by gravity.
\param outNode: the node with which the ellipoid collided (if any)
\param slidingSpeed: DOCUMENTATION NEEDED.
\param gravityDirectionAndSpeed: Direction and force of gravity.
\return New position of the ellipsoid. */
virtual core::vector3df getCollisionResultPosition(
ITriangleSelector* selector,
const core::vector3df &ellipsoidPosition,
const core::vector3df& ellipsoidRadius,
const core::vector3df& ellipsoidDirectionAndSpeed,
core::triangle3df& triout,
core::vector3df& hitPosition,
bool& outFalling,
const ISceneNode*& outNode,
f32 slidingSpeed = 0.0005f,
const core::vector3df& gravityDirectionAndSpeed
= core::vector3df(0.0f, 0.0f, 0.0f)) = 0;
Hier gibt es den Parameter const ISceneNode*& outNode, aber dieser erfüllt ganz und garnicht was er verspricht. Er sollte mir eigentlich den SceneNode zurückgeben mit dem er kollidiert ist, er gibt aber wenn eine Kollision stattgefunden hat den SceneNode zurück, der beim MetaTriangleSelector als erstes hinzugefügt wurde.
Was kann ich da machen?