ziggi / FCNPC

FCNPC - Fully Controllable NPC
Apache License 2.0
138 stars 31 forks source link

FCNPC_SetVehicleTrainSpeed #250

Open ivybush opened 3 years ago

ivybush commented 3 years ago

Synced speed is about 0.1925. If value is lower, the train jumps to track points, and with a higher value, it makes returns. I am using tracks.dat as the path, but with custom points are the same. youtu.be/elOv9839Aoo?t=9

ivybush commented 3 years ago

As I understood, the train is teleported point by point by FCNPC_GoByMovePath along with the movement by FCNPC_SetVehicleTrainSpeed. The speed of 1.0 in FCNPC_GoByMovePath is approximately 0.1925 in FCNPC_SetVehicleTrainSpeed. If I set both values correctly, then it works great for a tram. But for a train, this proportion changes when cornering in tunnels roughly doubled. And it is necessary to process these path points additionally.

ziggi commented 3 years ago

Yeah, some time ago I have tried to make train works good, but i gave up