Author Topic: Rotate the world around an axis instead of the camera ?  (Read 835 times)

Offline Mr_Chaos

  • int
  • **
  • Posts: 55
    • View Profile
Rotate the world around an axis instead of the camera ?
« on: June 21, 2014, 12:18:10 pm »
When I do rotation it's the camera that rotates. I would like somehow to rotate the world around and axis instead of the camera

Offline AGP

  • quad
  • ******
  • Posts: 1520
    • View Profile
Re: Rotate the world around an axis instead of the camera ?
« Reply #1 on: June 21, 2014, 12:53:56 pm »
Add everything as child of a dummy Object3D which you can place anywhere (before adding the children). Then rotate the dummy object. Or did I misunderstand the problem?

Offline Mr_Chaos

  • int
  • **
  • Posts: 55
    • View Profile
Re: Rotate the world around an axis instead of the camera ?
« Reply #2 on: June 21, 2014, 12:55:43 pm »
Add everything as child of a dummy Object3D which you can place anywhere (before adding the children). Then rotate the dummy object. Or did I misunderstand the problem?

I'll try it right away, but it sound like a plan.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11749
    • View Profile
    • http://www.jpct.net
Re: Rotate the world around an axis instead of the camera ?
« Reply #3 on: June 21, 2014, 01:30:28 pm »
That works for objects but not for lights. If that's a problem, you either have to rotate the lights by hand or use some additional dummy objects in the scene that specify the lights' positions.

Offline AGP

  • quad
  • ******
  • Posts: 1520
    • View Profile
Re: Rotate the world around an axis instead of the camera ?
« Reply #4 on: June 22, 2014, 02:52:33 am »
To that end, Egon, don't you think that everything, camera and lights included, should be a subclass of a class of some sort (Node or something)? I remember how much easier my life would have been when I first got started with jpct).