How to set camera lookAt?

Started by ramzes0071, July 13, 2013, 12:22:07 PM

Previous topic - Next topic

ramzes0071

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

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.

EgonOlsen

Not trivial...are these road parts rotated in the direction in which the road points or is that rotation baked into the geometry itself.

ramzes0071

Road parts are rotated in the right direction.

EgonOlsen

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.