move FieldOfView into Player
GitOrigin-RevId: 6d6a4094533819b11deebd5319616b5f5ed68948
This commit is contained in:
parent
66f895fab8
commit
24078d6c62
@ -25,9 +25,9 @@ namespace SemiColinGames {
|
||||
Vector2 eyePos = player.EyePosition;
|
||||
float visionRange = player.VisionRange;
|
||||
Vector2 ray = player.VisionRay;
|
||||
float fov = player.FieldOfView;
|
||||
|
||||
float visionRangeSq = visionRange * visionRange;
|
||||
float fov = FMath.DegToRad(120);
|
||||
float fovStep = fov / (numEdgeVertices - 1);
|
||||
|
||||
coneVertices[0] = new VertexPositionColor(new Vector3(player.EyePosition, 0), color);
|
||||
|
@ -159,6 +159,12 @@ namespace SemiColinGames {
|
||||
}
|
||||
}
|
||||
|
||||
public float FieldOfView {
|
||||
get {
|
||||
return FMath.DegToRad(120);
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 VisionRay {
|
||||
get {
|
||||
Vector2 ray = new Vector2(VisionRange * Facing, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user