Fred
05-12-2007 20:59:05
Hi,
I've a programm using Ogre and OgreODE.
There are some classes.
FrameListener,
Main,
Object,
FrameListener should be clear(Inputs)
Main is the main class which is the base of the programm. In it are created the FrameListener, Initialised the Physics and so on.
The Object class manages the objects. Create Entitys, Nodes, Bodys etc.
The movement behaves as follows:
If a button was pressed, a "movement vector" is set on Vector3(1,0,0).
In the move method of the object I wrote:
But now there is no gravity anymore. I was told that I have to define a force:
The same result.
What I have to do?
What's wrong?
Thanks for reply,
Fred
I've a programm using Ogre and OgreODE.
There are some classes.
FrameListener,
Main,
Object,
FrameListener should be clear(Inputs)
Main is the main class which is the base of the programm. In it are created the FrameListener, Initialised the Physics and so on.
The Object class manages the objects. Create Entitys, Nodes, Bodys etc.
The movement behaves as follows:
If a button was pressed, a "movement vector" is set on Vector3(1,0,0).
In the move method of the object I wrote:
int Object::Move(float fTime)
{
m_vPosition += 1000.0f * fTime * 0.2;
m_pBody->setPosition(m_vPosition);
return 0;
}
But now there is no gravity anymore. I was told that I have to define a force:
int Object::Move(float fTime)
{
m_vPosition += 1000.0f * fTime * 0.2;
m_pBody->addForce(Ogre::Vector3(0,-100000,0));
m_pBody->setPosition(m_vPosition);
return 0;
}
The same result.
What I have to do?
What's wrong?
Thanks for reply,
Fred