Multiple Path2D or v_offset

jerrymalmstromjerrymalmstrom Posts: 2Member

Hi

I am sort of a newbie in game development and compleatly fresh in Godot.
The game i am starting to develop is a kind of slot-car racing with 5 tracks that the cars run on.

The problem is that the player should be able to change track with the push of a button.
I have 2 (not working) solutions to this now:

  1. Have 5 Path2D next to each other and when the player changes track i simply load the curve from the correct track to "current track".
    Problem: The tracks are different length (curves) so the offset is different and the car doesnt change track on the same position.

  2. Increase v_offset with the width ot the track.
    Problem: The car will go faster in the curves since the track it follows are the inner track...

I have gotten the first "solution" to work a little better by syncing "Unit Offset", but its still not ok.

I hope you get my problem, i will attach some screenshots.

Thanks in advance

Tagged:

Tags :

Answers

Sign In or Register to comment.