Aktuelle Zeit: 28.03.2024, 10:50

Alle Zeiten sind UTC + 1 Stunde




Ein neues Thema erstellen Auf das Thema antworten  [ 1 Beitrag ] 
Autor Nachricht
 Betreff des Beitrags: getCollisionResultPosition()
BeitragVerfasst: 11.09.2012, 17:10 
Offline

Registriert: 07.08.2012, 15:34
Beiträge: 20
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?


Nach oben
 Profil  
 
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 1 Beitrag ] 

Alle Zeiten sind UTC + 1 Stunde


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 6 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de