hi,
i am using ogre 1.7 with ios template
i think something is wrong with deltatime calculations.
void OgreFramework::updateOgre(double timeSinceLastFrame) function i try 1000/60 instead of timeSinceLastFrame gives me more soomth result. but in lower fps using 1000/60 might be a problem.
maybe i am wrong.
thanks...
timeSinceLastFrame problem
-
masterfalcon
- OGRE Retired Team Member

- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
Re: timeSinceLastFrame problem
The calculation looks correct to me. It's just the current time minus the time at the beginning of a frame. Does profiling your app reveal any hot spots?
-
zafery
- Kobold
- Posts: 35
- Joined: Thu Oct 25, 2007 10:37 am
- x 1
Re: timeSinceLastFrame problem
i test it with your template with only adding the line below to "void OgreFramework::updateOgre(double timeSinceLastFrame)" function in OgreFramework.cpp
OgreFramework::getSingletonPtr()->m_pSceneMgr->getSceneNode("CubeNode")->roll(Ogre::Degree(timeSinceLastFrame/10)) ;
the line below gives more smooth result you can try
OgreFramework::getSingletonPtr()->m_pSceneMgr->getSceneNode("CubeNode")->roll(Ogre::Degree(100/60)) ;
i test it in my iphone device.
as i say before maybe i am wrong
thank...
OgreFramework::getSingletonPtr()->m_pSceneMgr->getSceneNode("CubeNode")->roll(Ogre::Degree(timeSinceLastFrame/10)) ;
the line below gives more smooth result you can try
OgreFramework::getSingletonPtr()->m_pSceneMgr->getSceneNode("CubeNode")->roll(Ogre::Degree(100/60)) ;
i test it in my iphone device.
as i say before maybe i am wrong
thank...
-
zafery
- Kobold
- Posts: 35
- Joined: Thu Oct 25, 2007 10:37 am
- x 1
Re: timeSinceLastFrame problem
hi
using getMilliseconds() instead of getMillisecondsCPU() is the right way i think.
but i don't understand why nobody has this problem. deltatime is very important for smooth results.
anyway use getMilliseconds() and also add a if state for bigger deltatime values.
thanks...
using getMilliseconds() instead of getMillisecondsCPU() is the right way i think.
but i don't understand why nobody has this problem. deltatime is very important for smooth results.
anyway use getMilliseconds() and also add a if state for bigger deltatime values.
thanks...