File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Game Development and the fly likes Problem while translating Mesh(JSR 184) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Problem while translating Mesh(JSR 184)" Watch "Problem while translating Mesh(JSR 184)" New topic
Author

Problem while translating Mesh(JSR 184)

Aparna Bhure
Greenhorn

Joined: Oct 30, 2007
Posts: 12
Hi,
I am developing a 3D game. I have a Mesh and I am trying to translate it using the following code:
public void translate(float dx, float dy, float dz)
{
iTM.get(f);
f[3] += dx; f[7] += dy; f[11] += dz;
iTM.set(f);
}
I have also tried to translate using postTranslate() method of transform.
But translation is not smooth, it is translating with some jurk. I have tried with different timer values, ie in Thread.sleep(delay). I have given different values to delay, I have also tried by involving "dt" ie system currenttime-PrevTime. But still it is having some jurk.
If I give a very small amount of translation then it looks good but it translate very slow, I need a fast translation.
It may be because of FPS on device, i am not getting a constant FPS.
Please if anybody have some solution for it, then let me know.

Thanks
 
jQuery in Action, 2nd edition
 
subject: Problem while translating Mesh(JSR 184)
 
Similar Threads
Default access
Problem while translating Mesh(JSR 184)
Canvas HELP!!!
Simple 2D collision response
Help with project using graphics