Author Topic: absolute translation  (Read 3383 times)

Offline fireside

  • double
  • *****
  • Posts: 607
    • View Profile
absolute translation
« on: October 14, 2010, 05:05:14 am »
I've forgotten how to do an absolute translation.  It's basically a relative motion, so how do I do that when the object is not at the point of origin?  Rotation doesn't matter in this case.  I just need to either get it back to the origin or compensate somehow.
click here->Fireside 7 Games<-

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: absolute translation
« Reply #1 on: October 14, 2010, 07:02:09 am »
Code: [Select]
obj.clearTranslation();
obj.translate(...);

Offline fireside

  • double
  • *****
  • Posts: 607
    • View Profile
Re: absolute translation
« Reply #2 on: October 14, 2010, 07:14:19 am »
Thanks.
click here->Fireside 7 Games<-

Offline Socke

  • byte
  • *
  • Posts: 17
    • View Profile
Re: absolute translation
« Reply #3 on: November 26, 2012, 07:49:23 pm »
And with rotation?

I need the position and rotation for network play.

I try object.getTranslationMatrix() -> network -> object.setTranslationMatrix() but this not work.

I think object.getTranslation() -> network -> object.clearTranslation() -> object.translate() work (not tested) but how send the rotation?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: absolute translation
« Reply #4 on: November 26, 2012, 08:53:05 pm »
As a matrix. You can get and set the rotation matrix.