Author Topic: How to translate to specific point?  (Read 258 times)

Offline arekz

  • byte
  • *
  • Posts: 8
    • View Profile
How to translate to specific point?
« on: July 12, 2016, 03:03:37 pm »
I cannot find simple thing. I want to put my Object3D instance to specific point, for example  (1f, 0f, 2f)
the Object3D has a method translate() but this method translate by vector (add to actual position).
How to make setTranslateTo(point) ?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: How to translate to specific point?
« Reply #1 on: July 12, 2016, 03:28:11 pm »
Something like:

Code: [Select]
obj.clearTranslation();
obj.translate(1f, 2f, 3f);