CR-Fix: Gauntlet-Holzrampe stand spiegelverkehrt
- vertical_ramp: rotation.x hatte das falsche Vorzeichen, die Flaeche stieg entgegen der Laufrichtung an (wirkte wie eine falsch herum eingebaute Wand vor der Felskante); Vorzeichen gedreht, vom Nutzer im Spiel getestet; Kies-Kurven-Rampen rechnerisch mitgeprueft (ok) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
e1dbff75dd
commit
d64cf71c0d
2 changed files with 19 additions and 1 deletions
|
|
@ -16,12 +16,14 @@ var _was_on_ramp := false
|
|||
|
||||
|
||||
## Baut die geneigte Holzfläche (Fuß bei z=0, Kopf bei -ramp_length).
|
||||
## Positives rotation.x hebt das -z-Ende an — die Fläche steigt in
|
||||
## Laufrichtung (lokal -z); das negative Vorzeichen stand spiegelverkehrt.
|
||||
func _ready() -> void:
|
||||
super()
|
||||
var slope := atan2(ramp_height, ramp_length)
|
||||
var surface_length := sqrt(ramp_height * ramp_height + ramp_length * ramp_length)
|
||||
_ramp = build_box(self, Vector3(1.8, 0.3, surface_length + 0.6), Vector3(0, ramp_height / 2.0, -ramp_length / 2.0), Color(0.6, 0.45, 0.3))
|
||||
_ramp.rotation.x = -slope
|
||||
_ramp.rotation.x = slope
|
||||
|
||||
|
||||
## Drückt langsame Spieler die Rampe hinunter; Sprint-Momentum hält an.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue