www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Mr_Chaos on June 21, 2014, 12:18:10 pm

Title: Rotate the world around an axis instead of the camera ?
Post by: Mr_Chaos 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
Title: Re: Rotate the world around an axis instead of the camera ?
Post by: AGP 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?
Title: Re: Rotate the world around an axis instead of the camera ?
Post by: Mr_Chaos 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.
Title: Re: Rotate the world around an axis instead of the camera ?
Post by: EgonOlsen 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.
Title: Re: Rotate the world around an axis instead of the camera ?
Post by: AGP 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).