shibby3d
23-12-2007 14:17:27
Hi,
I am trying to remove a shape on an actor in my project.
I dit it like this :
m_shape = m_body->addShape(new SphereShape(BOOL_SIZE))
m_body->removeShape(m_shape);
But I got a runtime error.
So I don't see how I could use removeShape ?
betajaen
23-12-2007 15:09:16
I expect it would crash. How would you like if all the matter in your body just vanished like that?
You need a second shape in that body, before you delete the first.
shibby3d
23-12-2007 16:05:16
Hi,
thank you for the fast answer,
I was putting a second shape just after have deleted the first one.
But even if I have more than one shape, I got the same crash.
Now my code looks like :
Shape* mySphereShape = m_body->addShape(new SphereShape(BOOL_SIZE));
Shape* myCubeShape = m_body->addShape(new CubeShape(10,10,10));
m_body->removeShape(mySphereShape);
And at the creation of the body I set a sphereShape(0.1).
So I have 3 Shapes, but I can not remove one.
Same crash than before.
shibby3d
24-12-2007 12:27:25
I traced the error, and the program break down at the instruction
m_body->removeShape(...)
betajaen
24-12-2007 13:04:14
Yeah. I gathered that. Can you get it to be more specific?
shibby3d
25-12-2007 13:13:56
Actually, I tryed to trace inside code of removeShape but I don't know how to do. I tryed to use the logManager of ogre, it compiled, but nothing appear on my log

.
Is there a kind of logManager in NxOgre ?
I apologize for my lack of knowledge about nxOgre but I began to use it this week and I have not internet access for the holidays... so I just have time to access this forum when I am with friends
betajaen
25-12-2007 13:25:44
Yes. There is a massive error handling and reporting system. You'll find the contents of those errors in NxOgre.log.html
shibby3d
26-12-2007 14:09:18
I don't have this file...
So I try to use NxOgreLog manually but it seems I can't create a log file..
I add the following line to the function addShape to test the creation :
Log * m_log = new Log(log::logtype::HTML);
ErrorReport m_error;
m_error.Message="test";
...
m_error.second = 0;
m_log->report(m_error);
delete m_log
And I don't get NxOgre.log.html created.
betajaen
26-12-2007 15:04:35
Come on, it's easy. You shouldn't do stuff like that.
mWorld = new World("log: html");
shibby3d
26-12-2007 16:27:26
Here my NxOgre.log, I dont think there is something interessant in.
NxOgre 0.9-38.Debug
T0F0
NxOgre::PhysXDriver::PhysXDriver#142
NxOgre (NxOgre 0.9-38.Debug) Started, working with:
- PhysX => 2.7.2
- Ogre => 1.4.5 'Eihort'
- Platform => Windows Debug
T0F0
NxOgre::ActorGroup::ActorGroup#76
Created ActorGroup 'Default' with GroupID as 0
T0F0
NxOgre::ShapeGroup::ShapeGroup#165
Created ShapeGroup 'Default' with GroupID as 0
T0F0
NxOgre::DominanceGroup::DominanceGroup#76
Created DominanceGroup 'Default' manually with GroupID as 0
T0F0
NxOgre::Material::Material#52
Created material manually named 'Default' with Material Index as 0
T0F0
NxOgre::FixedSceneController::init#134
FixedSceneController Initalised
betajaen
26-12-2007 17:40:26
Hmm. I'll try and duplicate the error and come up with something myself.
shibby3d
26-12-2007 18:20:40
Ok thank you, I'll ask to other person in my project team to do what I did to see if it's my configuration.