質問編集履歴
2
ソースコードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -43,7 +43,7 @@
|
|
43
43
|
//壁沿りベクトル
|
44
44
|
//引数1 : プレイヤーの進行ベクトル(正面ベクトル)
|
45
45
|
//引数2 : 壁の衝突時の法線ベクトル(CollisionOBB3D関数の7つ目の引数に設定した法線ベクトルを格納したもの)
|
46
|
-
*GetModel()->GetPos() = GetCollision()->CalcWallScratchVector(GetModel()->vecForward, GetCollision()->Obj2_Normalvector);
|
46
|
+
*GetModel()->GetPos() += GetCollision()->CalcWallScratchVector(GetModel()->vecForward, GetCollision()->Obj2_Normalvector);
|
47
47
|
}
|
48
48
|
```
|
49
49
|
|
1
ソースの修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -17,12 +17,12 @@
|
|
17
17
|
|
18
18
|
normal_n = GetMath()->Vector_Normalize(normal);//法線ベクトルを正規化
|
19
19
|
//進行ベクトルの逆ベクトルと法線ベクトルの内積
|
20
|
-
StaggeredNormal.x =
|
20
|
+
StaggeredNormal.x = GetMath()->Dot3DX(-front, normal_n);
|
21
|
-
StaggeredNormal.y =
|
21
|
+
StaggeredNormal.y = GetMath()->Dot3DY(-front, normal_n);
|
22
|
-
StaggeredNormal.z =
|
22
|
+
StaggeredNormal.z = GetMath()->Dot3DZ(-front, normal_n);
|
23
|
-
out.x = front.x
|
23
|
+
out.x = front.x + StaggeredNormal.x * normal.x;
|
24
|
-
out.y = front.y
|
24
|
+
out.y = front.y + StaggeredNormal.y * normal.y;
|
25
|
-
out.z = front.z
|
25
|
+
out.z = front.z + StaggeredNormal.z * normal.z;
|
26
26
|
return out;
|
27
27
|
}
|
28
28
|
```
|
@@ -37,7 +37,7 @@
|
|
37
37
|
GetFenceOutSide()->GetPosOBBNo1(),//壁の位置
|
38
38
|
GetFenceOutSide()->GetSizeOBBNo1(),//壁の当たり判定のサイズ
|
39
39
|
GetFenceOutSide()->GetRotOBBNo1(),//壁の向き
|
40
|
-
&GetFenceOutSide()->GetFenceNormal[
|
40
|
+
&GetFenceOutSide()->GetFenceNormal[0]))//壁の法線ベクトル
|
41
41
|
{
|
42
42
|
PrintDebugProc("[FenceOutSideOBBHitPlayeOBB : No1 : Hit]\n");
|
43
43
|
//壁沿りベクトル
|