I’ve been working on a minimalist roller coaster designing game for the past few weeks, but I recently encountered an issue while working on the track generation.
For context, the system that I am using allows the player to draw and adjust a Path3D that the CSGPolygon is based on, which I will call the TrackPath. There is another Path3D called the BankPath, though, and this is where the complexity comes in. The BankPath has the exact same number of points as the TrackPath, and each point is equal distance away from their corresponding TrackPath point, but the BankPath point’s orbit their corresponding TrackPath points in different directions.
I am trying to make the CSGPolygon (again, attached to the TrackPath) angle towards the corresponding point on the BankPath. I have been following this tutorial (https://www.youtube.com/watch?v=Gfpnxg-jne4) for the mesh generation, but it has nothing on how to handle mesh rotation, and I can’t figure out how any other way. Does anybody have any idea how to do this?
Also, I am somewhat new to Godot so sorry if I am missing something really obvious.
I honestly don’t quite understand what you’re trying to achieve with this. Can you make a simple sketch in Paint or something similar that shows visually what you’re trying to do?
And some screenshots from Godot that shows it would help too, if you have anything to show.
Thanks for the response. My goal is to generate a mesh along a path (TrackPath) that angles toward another path (BankPath) that has an equal amount of corresponding points. Here’s a visual of what I’m talking about. The TrackPath (based on the black points in the image) is what the CSGPolygon mesh is based off of (look at the YouTube link in my initial post if this doesn’t make sense). This allows me to generate a roller coaster track mesh, but the problem is that I can’t control rotation.
This is where the BankPath comes in (based on the red points in the image). In the example, the TrackPath is the roller coaster layout (lifthill, drop, turn, straight track, final turn), but the BankPath is supposed to tell the TrackPath that the rotation of any given TrackPath point should be (for instance, the “straight track” in the example is actually a corkscrew based on the BankPath, and the 2 turns are also banked).
To reiterate, my end goal is to generate a mesh visual representing the roller coaster track with it’s rotation being controlled by the BankPath.
Yes, the visualization helps a lot. There is a tilt property of the path_point that affects the CSGPolygon3D mesh’s rotation. Could you perhaps use that instead?