rride
06-09-2011 12:40:39
If an entity passed to TreeCollision constructor is not attached to a node, Newton's collision object will be created incorrectly, since scale will be not initialized.
--- a/OgreNewt_CollisionPrimitives.cpp Tue Sep 06 13:10:57 2011 +0300
+++ b/OgreNewt_CollisionPrimitives.cpp Tue Sep 06 14:35:22 2011 +0300
@@ -260,7 +260,7 @@ namespace OgreNewt
TreeCollision::TreeCollision( const World* world, Ogre::Entity* obj, bool optimize, int id, FaceWinding fw ) : Collision( world )
{
- Ogre::Vector3 scale;
+ Ogre::Vector3 scale(1, 1, 1);
start(id);
--- a/OgreNewt_CollisionPrimitives.cpp Tue Sep 06 13:10:57 2011 +0300
+++ b/OgreNewt_CollisionPrimitives.cpp Tue Sep 06 14:35:22 2011 +0300
@@ -260,7 +260,7 @@ namespace OgreNewt
TreeCollision::TreeCollision( const World* world, Ogre::Entity* obj, bool optimize, int id, FaceWinding fw ) : Collision( world )
{
- Ogre::Vector3 scale;
+ Ogre::Vector3 scale(1, 1, 1);
start(id);