BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How do I display speed limits projected by a route inside of a 3D Cab

3 posters

Go down

How do I display speed limits projected by a route inside of a 3D Cab Empty How do I display speed limits projected by a route inside of a 3D Cab

Post by Inamak17 Mon Apr 06, 2020 4:01 pm

Hello. I would like to create a 3D cab animation where there are two displays. Display 1 shows the speed limit projected by the route, while Display 2 is the speedometer. How exactly would I get this animation to work?

Inamak17

Posts : 9
Join date : 2020-04-01

Back to top Go down

How do I display speed limits projected by a route inside of a 3D Cab Empty Re: How do I display speed limits projected by a route inside of a 3D Cab

Post by zbx1425 Tue Apr 07, 2020 7:20 am

Well, unfortunately there seems to be no easy way to get the precise speed limit of the route.
You have to either turn on the ATC safety system and use the pluginState[271], or write an ats plugin yourself. Getting speed is fairly easy by using speedometer .
For the displays, you should use rotation animations for needles, and state change animations for digital numbers. Besides that, .animated is nothing but hard math work.
Explaining and understanding how animated models work can both be not quite easy. Just remember you are writing some math formulas that calculates the desired number, angle or position based on vehicle status as variables. I suggest you take a look at https://openbve-project.net/documentation_hugo/en/objects/native/animated.html .
zbx1425
zbx1425

Posts : 143
Join date : 2017-08-18
Location : China

https://www.zbx1425.cn

Back to top Go down

How do I display speed limits projected by a route inside of a 3D Cab Empty Re: How do I display speed limits projected by a route inside of a 3D Cab

Post by leezer3 Wed Apr 08, 2020 5:55 pm

Easy addition for once Smile

I've added the following to the latest nightly builds:
https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2020-04-08.zip


Animated Files:
routeLimit : Returns the current route speed limit in km/h applying to the train. Remember that this limit only increases when the last vehicle in the train has passed the speed limit location.

Panel 2 Files:
routeLimit : Returns the current route speed limit in km/h applying to the train. Remember that this limit only increases when the last vehicle in the train has passed the speed limit location.

Will be in the next release (week or two hopefully), and I'll update the documentation on the main site at this point.

leezer3

Posts : 1961
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

How do I display speed limits projected by a route inside of a 3D Cab Empty Re: How do I display speed limits projected by a route inside of a 3D Cab

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum