The crag: a 26 m box-rock cliff with a graded climbing route
North of the playground, facing spawn: bouldering blocks, a ladder to an 8 m rest ledge, a jug wall, a 0.4 m traverse ledge, an overhang with monkey bars and a lip bar onto a 16 m rest ledge, a chimney to the 26 m summit with throwable props. A 'Crag' teleport marker at the base is the way down; teleports now land the floor on the marker's height. Floor widened to 80 m. Regression: scenes/crag_spike.tscn (reach, free space, overlaps, height, line of sight). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
84df772f38
commit
ca9a299fe8
9 files changed
+554
-8
No files matched your search
@@ -232,13 +232,16 @@ public partial class Locomotion : Node
|
||||
|
||||
private void MoveToSpawn() => PlacePlayer(_spawn.GlobalPosition, ForwardYaw(_spawn.GlobalTransform));
|
||||
|
||||
private void PlacePlayer(Vector3 targetXz, float yaw)
|
||||
// Lands the play-space floor on the target's height (head height above the floor kept), so a
|
||||
// marker at the foot of the crag brings you down from the summit instead of dropping you 26 m.
|
||||
private void PlacePlayer(Vector3 target, float yaw)
|
||||
{
|
||||
Transform3D h = _camera.GlobalTransform;
|
||||
Transform3D hLocal = _origin.GlobalTransform.AffineInverse() * h;
|
||||
float hmdYaw = h.Basis.GetEuler().Y;
|
||||
Basis basis = Basis.FromEuler(new Vector3(0, yaw - hmdYaw, 0)) * h.Basis;
|
||||
Transform3D desired = new Transform3D(basis, new Vector3(targetXz.X, h.Origin.Y, targetXz.Z));
|
||||
float headAboveFloor = h.Origin.Y - _origin.GlobalPosition.Y;
|
||||
Transform3D desired = new Transform3D(basis, new Vector3(target.X, target.Y + headAboveFloor, target.Z));
|
||||
_origin.GlobalTransform = desired * hLocal.AffineInverse();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user