Author Topic: How to lock translations?  (Read 764 times)

Offline Yerst

  • byte
  • *
  • Posts: 38
    • View Profile
How to lock translations?
« on: July 30, 2013, 05:52:44 pm »
Hey!
At first, i wan't to translate the model to a point in the game.
Then i translate it again (with the camera Position), but  i clear the translations every frame.
When i clear the translations, the translation i made at the beginning is also cleared.
Can i lock the translation or translate it in a way that the translation doesn't get cleared when i call clearTranslations?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12011
    • View Profile
    • http://www.jpct.net
Re: How to lock translations?
« Reply #1 on: July 30, 2013, 08:57:28 pm »
You can apply the current translation to setOrigin(...) and then clear it. That should do the trick.

Offline Yerst

  • byte
  • *
  • Posts: 38
    • View Profile
Re: How to lock translations?
« Reply #2 on: July 30, 2013, 11:09:55 pm »
Thx, but how do i also do this with rotations?