【Xbox360】 XNA Game Studio その4 【C#】at GAMEDEV
【Xbox360】 XNA Game Studio その4 【C#】 - 暇つぶし2ch145:名前は開発中のものです。
08/01/27 18:32:52 uw/hNxBV
遅いを通り越して、C'NKY

ここの
URLリンク(creators.xna.com)
CalculateCursorRay()って函数にそのものズブリがあった。

Positionは(0,0)~(853,480)のウィンドウ上の2次元座標な。
Vector3 nearSource = new Vector3(Position, 0f);
Vector3 farSource = new Vector3(Position, 1f);

Vector3 nearPoint = GraphicsDevice.Viewport.Unproject(nearSource,
          projectionMatrix, viewMatrix, Matrix.Identity);

Vector3 farPoint = GraphicsDevice.Viewport.Unproject(farSource,
          projectionMatrix, viewMatrix, Matrix.Identity);



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch