Animated pantograph under OpenBve implementation
The animated tutorial can be traced to a specific article of electricity, the show is based on Schlick AF.
The pantograph is a simple example of moving the rod are presented. Animated efect is working if a DLL plugin is alredy configured.
This article was based on the configuration of Os_Ats1.dll.
The pantograph object
[Meshbuilder]
cylinder 6,0.02,0.02,3.08
rotate 1,0,0,-90
translate 0,0,-1.54
For instance, the name of the object: aramszedo.b3d. Simple hexagonal rods 4cm diameter 3.08 m in length. The origin
at the end of the rod. Changing the external view of the rod up and reach the top wire. The length is set
building was erected in place to reach the wire, which is 6 meters high.
The animated object
For instance, the name of the object: anime.animated, anime the aramszedo.b3d object.
[OBJECT]
States = aramszedo.b3d
Position = 0,3.43,0
rotateXFunction = if[pluginstate[106]==1,
max[value-delta*0.3,0+0.005*sin[time]],
min[value+delta*0.4,0.98+0.005*sin[time]]]
rotatexdamping = 2,0.7
- States command loads an object of the pantograph.
- position command pushed the pantograph 3:43 m tall, the top of tram.
- rotateXFunction parancs a forgatást végzi.
- pluginstate[106] state control the pantograph totatins. A pluginstate[106] is a numeric 6 button.
- if[pluginstate[106]==1 state and follows the two formula, thet define the phantograph's two end positions.
- max[value-delta*0.3,0] Az áramszedő alsó végállása, elfordulási szög nincs
- min[value+delta*0.4,0.98] the upper end position. The totating angle is 0.98 rad. 0.4
define the speed of rotation. The up and down movement speed does not equal
- 0.005*sin[time] some fine movement into the system, causing a movement as if moved by hand,
and sleep mode, there is little sway, making seems more natural.
- rotatexdamping Gives weight to the object, making it more difficult to start and harder to stop, and beyond
the effect of vibration gives.
Os_Ats1.cfg detail
Configure keyboard keys to control the object.
customindicators=7,102,11,106
11,106 This configuration allows installment the numeric 6 button control the pluginstate[106] states.
7,102 An extension device used to control the future. In this code enable, the numeric 2 button control the
pluginstate[102] states.
Animation, based a state of the pantograph
anime.animated animated object further snippet:
[OBJECT]
States=front_light.b3d
Statefunction = 1- (pluginstate[102] & !pluginstate[106])
Displays the spotlight beam, if press a 2 button, that change the pluginstate[102] state, and the pantograph is up.
Down to the pantograph, the light is falling asleep.
This animation have two errors:
*The power is switched on immediately lifting the pantograph, just as it reaches the top wire.
*The pantograph does not affect the status engine controller. In lowered state you can be start the
vehicle.
xxxx