Ok this question is a little complicated, but hopefully someone can
make some sense of it. I have 5 planes arranged in a circle, all
facing outward from the center point they are based around. The idea
is to let the user rotate around them, which works fine. I have it set
up so you can click on a given plane and it will rotate around to it.
So the problem comes when I want the selected plane to smoothly rotate
toward the camera as the camera is rotating around toward the plane. I
have created a "dummy" Object3D, set it's x,y,z to the same as the
plane, and told it to lookAt(camera.position), then I adjust pitch so
it is facing correctly (which I tested with the actual plane before).
So I should have calculated the exact rotation that I want to tween to
for that frame, right? I use TweenMax to tween to that frame, and for
1 out of the 5 planes it works perfectly. Camera is set to lookAt
plane, and plane is tweening to lookAt camera, and they match up
perfectly every time. The other four all tween toward different weird
angles though... If I get rid of the tween and just set the plane to
lookAt camera, getting the rotation the same way with Object3D, it
works fine, but obviously just snaps to look at the camera instantly.
So I don't think there is any problem with my code, since it's
obviously getting the correct rotation variables. Any suggestions?

Reply via email to