sion: 3072m Sion map loader, Ymir heightfield+trimesh physics, LOD1/LOD2 renderer, and tests
This commit is contained in:
parent
dccfbb95b5
commit
1864acecb7
14 changed files with 2242 additions and 183 deletions
|
|
@ -227,7 +227,7 @@ public partial class ArenaRenderer : Node3D
|
|||
Multimesh = _vfxBeamMm,
|
||||
MaterialOverride = _vfxMat,
|
||||
CastShadow = GeometryInstance3D.ShadowCastingSetting.Off,
|
||||
CustomAabb = new Aabb(new Vector3(-900f, -60f, -900f), new Vector3(1800f, 220f, 1800f)),
|
||||
CustomAabb = new Aabb(new Vector3(-1600f, -60f, -1600f), new Vector3(3200f, 450f, 3200f)),
|
||||
PhysicsInterpolationMode = PhysicsInterpolationModeEnum.Off,
|
||||
Visible = false
|
||||
};
|
||||
|
|
@ -247,7 +247,7 @@ public partial class ArenaRenderer : Node3D
|
|||
Multimesh = _vfxSphereMm,
|
||||
MaterialOverride = _vfxMat,
|
||||
CastShadow = GeometryInstance3D.ShadowCastingSetting.Off,
|
||||
CustomAabb = new Aabb(new Vector3(-900f, -60f, -900f), new Vector3(1800f, 220f, 1800f)),
|
||||
CustomAabb = new Aabb(new Vector3(-1600f, -60f, -1600f), new Vector3(3200f, 450f, 3200f)),
|
||||
PhysicsInterpolationMode = PhysicsInterpolationModeEnum.Off,
|
||||
Visible = false
|
||||
};
|
||||
|
|
@ -267,7 +267,7 @@ public partial class ArenaRenderer : Node3D
|
|||
Multimesh = _vfxRingMm,
|
||||
MaterialOverride = _vfxMat,
|
||||
CastShadow = GeometryInstance3D.ShadowCastingSetting.Off,
|
||||
CustomAabb = new Aabb(new Vector3(-900f, -60f, -900f), new Vector3(1800f, 220f, 1800f)),
|
||||
CustomAabb = new Aabb(new Vector3(-1600f, -60f, -1600f), new Vector3(3200f, 450f, 3200f)),
|
||||
PhysicsInterpolationMode = PhysicsInterpolationModeEnum.Off,
|
||||
Visible = false
|
||||
};
|
||||
|
|
@ -287,7 +287,7 @@ public partial class ArenaRenderer : Node3D
|
|||
Multimesh = _dropDiscMm,
|
||||
MaterialOverride = _vfxMat,
|
||||
CastShadow = GeometryInstance3D.ShadowCastingSetting.Off,
|
||||
CustomAabb = new Aabb(new Vector3(-900f, -60f, -900f), new Vector3(1800f, 180f, 1800f)),
|
||||
CustomAabb = new Aabb(new Vector3(-1600f, -60f, -1600f), new Vector3(3200f, 450f, 3200f)),
|
||||
PhysicsInterpolationMode = PhysicsInterpolationModeEnum.Off,
|
||||
Visible = false
|
||||
};
|
||||
|
|
@ -307,7 +307,7 @@ public partial class ArenaRenderer : Node3D
|
|||
Multimesh = _dropPillarMm,
|
||||
MaterialOverride = _imperialBeaconMat,
|
||||
CastShadow = GeometryInstance3D.ShadowCastingSetting.Off,
|
||||
CustomAabb = new Aabb(new Vector3(-900f, -60f, -900f), new Vector3(1800f, 180f, 1800f)),
|
||||
CustomAabb = new Aabb(new Vector3(-1600f, -60f, -1600f), new Vector3(3200f, 450f, 3200f)),
|
||||
PhysicsInterpolationMode = PhysicsInterpolationModeEnum.Off,
|
||||
Visible = false
|
||||
};
|
||||
|
|
@ -460,7 +460,7 @@ public partial class ArenaRenderer : Node3D
|
|||
_safeRingImm.SurfaceBegin(Mesh.PrimitiveType.Triangles);
|
||||
|
||||
const int segments = 160;
|
||||
const float halfThick = 1.1f;
|
||||
float halfThick = terrain.MapSize > 2000f ? 2.2f : 1.1f;
|
||||
float rInner = MathF.Max(2f, safeRadius - halfThick);
|
||||
float rOuter = safeRadius + halfThick;
|
||||
|
||||
|
|
@ -832,7 +832,7 @@ public partial class ArenaRenderer : Node3D
|
|||
|
||||
if (!_dropVisuals.TryGetValue(d.Id, out var entry))
|
||||
{
|
||||
TerrainField.WorldToTile(d.X, d.Z, out int tx, out int tz);
|
||||
state.Terrain.MapWorldToTile(d.X, d.Z, out int tx, out int tz);
|
||||
float baseY = state.Terrain.SampleHeight(d.X, d.Z);
|
||||
if (d.Module is { } mod)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue