There are many ways to move a camera through a scene. We can walk or fly. We
can look one direction while moving another and so on. Here we're moving a bit
sideways and a bit forward while looking forward. I usually think of the camera
as being in one of two modes, viewer-centric or model-centric. When things are
viewer-centric the viewer is moving around through the world. When
model-centric, a particular object in a world is being studied and the viewers
goal is to see this object from different angles. In this mode we keep the
camera focused on a location as we move. The place where we look is called the
Target in 3JS. And in other systems. Note that this Target location is not at
all necessary in making the various matrices need for viewing the scene. The
target is much more related to user intent. Because the target is such a useful
concept, many, but not all, camera control systems support the idea of a target
in some way. To set the target we use the camera control's target parameter.
We've set this parameter before. It provides the point that our camera is
looking at, so setting the view matrix. By setting the target in the camera
controls, you not only set the camera's view transform, you keep the camera
pointed at this location when you orbit. If the object is moving, you can
update the target each frame, and the camera will stay trained on it.
シーンの中でカメラを動かす方法は数多くあります
歩いたり飛んだり
動きながらある方向に向けたりできます
これは前を向いたまま横や前へ動かしています
カメラを視点中心かモデル中心かの
どちらかで考えます
視点中心は視点が空間の中で動きます
モデル中心は空間の中のあるオブジェクトを観察し
別の角度から眺めることが目的です
私たちが動く所へカメラの焦点を合わせる方法です
見ている場所のことをthree.jsでは注視点といいます
別のシステムでは注視点が必要ないこともあります
注視点はユーザの目的に関わる便利な概念です
すべてのカメラコントロールが
注視点をサポートするわけではなく
注視点を設定するために
カメラコントロールのパラメータを使います
以前設定したこのパラメータはビュー行列を用いて
カメラが見ている場所を決めます
注視点を設定するとビュー変換だけでなく
回転時の場所をカメラが示すよう設定します
オブジェクトが動けば注視点を
それぞれのフレームに更新できます
カメラはオブジェクトに向けたままです