开发者

Getting Relative Position of a Rotating Camera

I have a Viewport3D with a 3D model composed of multiple smaller components centered at the origin. I'm animating the PerspectiveCamera to rotate about the Y-axis using an AnimationClock created from a DoubleAnimation to create a rotating effect on the model. In addition, I have another rotateTransform3D assigned to the camera's transformgroup to enable the user to orbit around and zoom in-out of the model using the mouse.

I want to be able to translate each component as it is开发者_如何学JAVA being selected to move in front of the rotating camera. However, I don't know how to get the position of the camera relative to the 3D model because the coordinate system of camera is being animated and transformed by the user's input.

Is there a way to get the offset between two coordinate systems?

Any help or suggestions would be appreciated.

Thanks,

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜