How do i sense a train moving up a hill?

I’m tinkering with a train’s movement system to have it slowly accelerate if going downhill, and slow up if it’s going uphill. I’ve tried to use assemblyangularvelocity but it seems sporadic so i’d like to double check with others to see if there’s a good way to do it, and also what direction (x, y, z) to use.

i’m currently using this, but i can’t find much documentation as to what direction is which, and if a positive value is up or down. (cvel is the target speed)
image

detect X orientation, higher value like 45 maens it’s going 45 degrees up, -45 is meaning facing down going down 45 degree down

1 Like


got it, thanks!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.