I would like to know how to make a railway acceleration and control system.

I would like to know how to make a railway acceleration and control system.

This train is based on this video:

Welcome!
On Train Pawn

1 Like

Thank you!
I have one more question: how do I control the notched slots 0-8?

No worries, I will demonstrate a simple notch for this design however I would like to mention couple of things.

  • This tutorial you follow simply a kinematic simulation. So notches and breaks are basically simple increments. Real notch mindset cannot be simulated purely with this design.
  • Notches in real locomotives are simply engine power level interms of input and output and this is close relation with the torque meaning it is heavyly effected from the angle of movement (climbing, downhill), train mass even diameter of the wheels and ratio of gears.
  • In this tutorial notches can be only be simple speed limits or increments of speed. I will simply demonstrate it as speed increments/decrements below.

Make a new input as you wish on press W/S fires once like below

S→Modifier→Negate

W is simply on press one time returns 1 and S returns -1

With input change notch 0 - 8
On tick NotchNumber * SpeedIncrement is slowly increases and reaches to SpeedIncrement = CurrentSpeed over time.

if SpeedIncrement = 100

Notch 8 * 100 = TopSpeed 800

Happy developing.;

1 Like

thank you!

What is the value of Current Notch node?

0 (zero) as default start.


It won’t move…

so


This one is wrong its greater

image

Also it should move, is your speed values changing? you can try to print them as well to see changes happening in speed variable or not.

Are you seeing the correct notch levels printed?

If not you can check your input settings again. Try to have exactly like in

Speed ​​and Notch are unresponsive.

are you using the correct input mapping context currently?

I feel that maybe your input not working at all?

Hmm
Enhanced Input Local Player Subsystem & Add mapping Context How do you make it?

drag a pin from player controller and try like that. Nodes are context sensitive.

1 Like

Thank you! This was helpful!

1 Like