構造体 GcSweepResult
Namespace: GameCanvas
csharp
public readonly struct GcSweepResult : System.IEquatable<GcSweepResult>衝突情報
継承元
System.IEquatable<GcSweepResult>
フィールド
ForwardVector
csharp
public readonly float2 ForwardVector進行ベクトル(SweepTest関数のdelta引数に与えられた値)
HitNormal
csharp
public readonly float2 HitNormal衝突点の法線を表す単位ベクトル
HitPoint
csharp
public readonly float2 HitPoint衝突点
PositionOnHit
csharp
public readonly float2 PositionOnHit衝突時(めり込む直前)のオブジェクト座標
SweepRatioOnHit
csharp
public readonly float SweepRatioOnHit移動量に対して、めり込む直前までの移動量の割合
備考
初期位置で既にめり込んでいた場合、0よりも小さい値になります
VectorToHit
csharp
public readonly float2 VectorToHit初期位置から衝突点(めり込む直前)までの移動量ベクトル
備考
初期位置で既にめり込んでいた場合、ForwardVector * SweepRatioOnHit と異なる値になります
メソッド
CalcReflect(float2, float2, float)
csharp
public void CalcReflect(out float2 dir, out float2 pos, in float coefficient = 1f)反射を考慮した移動後の座標を計算します
パラメーター
dir— 反射方向を表す単位ベクトルpos— 反射を考慮した移動後の座標coefficient— 反射係数
CalcReflectDir()
csharp
public float2 CalcReflectDir()反射方向を計算します
戻り値
反射方向を表す単位ベクトル
CalcReflectPoint(float)
csharp
public float2 CalcReflectPoint(in float coefficient = 1f)反射を考慮した移動後の座標を計算します
パラメーター
coefficient— 反射係数
戻り値
反射を考慮した移動後の座標
CalcWallScratch(float2, float2)
csharp
public void CalcWallScratch(out float2 dir, out float2 pos)壁ずりを考慮した移動後の座標を計算します
パラメーター
dir— 壁ずり方向を表す単位ベクトルpos— 壁ずりを考慮した移動後の座標
CalcWallScratchDir()
csharp
public float2 CalcWallScratchDir()壁ずり方向を計算します
戻り値
壁ずり方向を表す単位ベクトル
CalcWallScratchPoint()
csharp
public float2 CalcWallScratchPoint()壁ずりを考慮した移動後の座標を計算します
戻り値
壁ずりを考慮した移動後の座標
Equals(GcSweepResult)
csharp
public bool Equals(GcSweepResult other)Equals(object)
csharp
public override bool Equals(object obj)GetHashCode()
csharp
public override int GetHashCode()ToString()
csharp
public override string ToString()演算子
operator !=(GcSweepResult, GcSweepResult)
csharp
public static bool operator !=(GcSweepResult lh, GcSweepResult rh)operator ==(GcSweepResult, GcSweepResult)
csharp
public static bool operator ==(GcSweepResult lh, GcSweepResult rh)