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

How to write this function formula ??

Go down

How to write this function formula ?? Empty How to write this function formula ??

Post by ADbve Thu Feb 24, 2022 9:22 pm

I have a pantograph object already break to 5 piece, i want to animate it like in shinkansen E5 by ginga that we can raise/lower using number 7.

I dont want to just copy and paste his function, i want to learn how it works so i try it and i found this simple formula:

TranslateYDirection = 0,1,0
TranslateYFunction = if[pluginstates[10] < 1, 0.8, 0]

But it just move the object to 0.8 meter higher instantly, not moving the object slowly like in his addon.

How to move it slowly until it reach the position i set it ?

TLDR
I want the object moving to next position when i press the key and if the object already in the next position it should back to original position when i press the key again.


Note: if i already understand how it works im gonna make some preset formula and release it to public domain so anyone can use that formula as freely as possible.

ADbve

Posts : 72
Join date : 2020-05-14

Back to top Go down

Back to top

- Similar topics

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