Make realtime path?


Is there a way to make realtime paths like in the rollercoasters from rollercoaster tycoon?
I want to make a game where you can make your own darkride.
I can make the editor and the trackparts, but how do you make the car follow the track?

Is this even possible with Blender?


Probably not without python. But I’m assuming that if you are doing a track editor, you have a good grasp of python. Use python to get the position and orientation of each object. Then use intervals for how many frames to get to the next piece? The only problem , I see is that bullet physics, would not work.

Psuedo Code

position = Next_track_piece_position-Train_position # Get the difference

rotation = Next_track_piece_rotation -Train_rotation # Get the difference

Position_interval = position/speed #speed would be however many frames you want to the next piece

Rotation_interval = rotation/speed #speed would be however many frames you want to the next piece

Train_position = Train_position + Position_interval

Train_rotation= Train_rotation+ Rotation_interval

frame = frame + 1

if frame>speed:
I think that would work… but as I said it would not have any physics. You might be able to approximate, by modifying the speed value based on the orientation of the track piece. Also you would have to make sure that each track piece was the same length. SO like you could have a default piece of length 1. Then you would multiply speed by such value. A curve, would have to be made of many piece’s to.

Hopefully that helps.

P.S. There are probably other ways that might work better

You could have the car follow the track’s normals. Maybe using the new constraints? Then physics should still work.

just give each track part a property value and have the car follow the value in nummerical order

that way it wont matter what kind of track it is as long as the pieces are given the proper number for said property

like u can have 10 distinct track pieces to mix and match and lay them down anyway that you like, and the car will know how to travel simply by knowing which instance of each track piece object has which property value