A problem in using setVelocity

darkdragon

23-02-2006 06:05:41

The problem is simple, but confuses me.
When I used this function, I found that oreintations of all movable objects became default and I couldn't to change them.
Not only the entity that I attached to body was fixed, but also the camera object was.

Another point is that when I import the demos with using Code::Blocks and compile them, everythins is OK.
But when I create a new project and add the same files, the results are not the same.

So,
Could anybody teach me what happend?
I used Ogre 1.0.6 and compiled with GCC 3.4.4.

haffax

23-02-2006 08:14:35

Please be more specific in error descritptions. What does "the results are not the same" mean specifically?

And what does "orientation becomes default" mean? What was the expected behaviour of what exact steps and how did the result you get deviate?

darkdragon

24-02-2006 06:32:41

Sorry! The description is too simple.

First, if I compiled the projects imported from OgreNewt_Main.sln, the results of running the programs were normal. I could rotate every movable object.
But using the same source codes in the project I created, the movable objects were fixed like setOrientation(Quaternion::IDENTITY).

Second, "orientation becomes default" mean that the objects looked like forcing setOrientation(Quaternion::IDENTITY).

Third, besides this situation, I could translate them and shoot them to collide with other rigid bodies.

Of course, I tried to copy the OK imported projects to my Ogre's directory and compile again. But this way didn't work.

So, I don't know why the same codes and settings cause the different situations.

walaber

24-02-2006 07:40:20

that is very strange. something must be different... im not sure what it could be...

are the project settings the same? (multithread DLL, etc)

darkdragon

24-02-2006 15:53:57

OK! I found the answer!
But it's still strange.

My Ogre source, NewtonSDK and OgreNewt are installed in the disk D.
and Ogre diretory I used is in the disk C. So I copy the static libraries from disk D to C. For example, the newton.lib is copyed from d:\NewtonSDK\sdk\dll to c:\ogre\lib.

When I builded the projects in OgreNewt diretory, that's OK. Because the relative pathes are right. But when the projects in the disk C, I add the link directory "c:\ogre\lib" to link the newton.lib and other static libraries. In this situation, the rotate function is inactive.

But why?
Why must it link the newton.lib in the default installed directory for using setVelocity function?

walaber

24-02-2006 17:24:14

i don't know that is VERY strange. I think you probably have different versions of the .lib file spread around, and that is causing problems. it might not just be newton.lib, but also the various Ogre DLLs...