For a new project, I wanted to go with a 2.5d solution. Unfortunately, for optimization, Unity does not allow the rotation of terrains and mesh-based terrains wouldn't be ideal. In order to allow for exciting background scenery, while keeping the illusion of a 2D game, movement along a spline would be important.

Für ein neues Projekt wollte ich eine 2,5D-Lösung verwenden. Leider erlaubt Unity aus Optimierungsgründen keine Drehung von Terrains, und meshbasierte Terrains wären nicht ideal. Um spannende Hintergrundlandschaften zu ermöglichen und gleichzeitig die Illusion eines 2D-Spiels zu bewahren, wäre eine Bewegung entlang einer Spline wichtig.

Per un nuovo progetto, volevo optare per una soluzione 2.5D. Purtroppo, per motivi di ottimizzazione, Unity non consente la rotazione dei terreni e i terreni basati su mesh non sarebbero l'ideale. Per ottenere uno scenario di sfondo emozionante, pur mantenendo l'illusione di un gioco 2D, sarebbe importante il movimento lungo una spline.

For the splines, I started with BansheeGz/BGCurve.

Für die Splines habe ich mit BansheeGz/BGCurve begonnen.

Per le spline, ho iniziato con BansheeGz/BGCurve.

The core function is to have the object always looking forward, by calculating the tangent of the closest point.

Die Kernfunktion besteht darin, das Objekt immer nach vorne schauen zu lassen, indem die Tangente des nächstgelegenen Punktes berechnet wird.

La funzione principale è quella di mantenere l'oggetto sempre rivolto in avanti, calcolando la tangente del punto più vicino.

Copy to Clipboard

The Y axis needed to be freed to allow for gravity.

Die Y-Achse musste freigegeben werden, um die Schwerkraft zu berücksichtigen.

L'asse Y doveva essere liberato per consentire l'azione della gravità.

Copy to Clipboard

The Y axis needed to be freed to allow for gravity, and to smooth out the physics I also projected the velocity along the spline.

Die Y-Achse musste freigegeben werden, um die Schwerkraft zu berücksichtigen, und um die Physik zu glätten, habe ich auch die Geschwindigkeit entlang der Spline projiziert.

L'asse Y doveva essere liberato per consentire l'azione della gravità e, per uniformare la fisica, ho anche proiettato la velocità lungo la spline.

Copy to Clipboard