www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: ramzes0071 on July 13, 2013, 12:22:07 PM

Title: How to set camera lookAt?
Post by: ramzes0071 on July 13, 2013, 12:22:07 PM
Hi,
I'm writing to you because I don't know how to set camera.lookAt property on my object3D. I have route composed of several parts. Each is object3d.
My routelooks like this

http://drspikecook.com/files/2012/02/istock_winding_road-1jdvrl0.jpg (http://drspikecook.com/files/2012/02/istock_winding_road-1jdvrl0.jpg)

Each part is responsible for part of the route. If is no longer visible is move at the end of route. So how to set lookAt to this route.
Title: Re: How to set camera lookAt?
Post by: EgonOlsen on July 13, 2013, 11:28:55 PM
Not trivial...are these road parts rotated in the direction in which the road points or is that rotation baked into the geometry itself.
Title: Re: How to set camera lookAt?
Post by: ramzes0071 on July 14, 2013, 12:24:17 PM
Road parts are rotated in the right direction.
Title: Re: How to set camera lookAt?
Post by: EgonOlsen on July 14, 2013, 09:21:58 PM
In that case, you migh tbe able to combine the transformed center of each part in combination with the result one of the get?Axis()-methods in Object3D and some crude interpolation to something that works well enough.