Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem while translating Mesh(JSR 184)

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic