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

how to animate a speedometer needle on 3d cab ?

2 posters

Go down

how to animate a speedometer needle on 3d cab ? Empty how to animate a speedometer needle on 3d cab ?

Post by ADbve Tue Feb 08, 2022 10:28 am

hello

i made a 3d cab with a animated speedometer in it but when i rotate the needle around 35 degree on X axis to match the angle of speedometer object it will broke the rotation of the needle, i already use rotatexfunction and direction to rotate the needle but it still make same result, i also test to rotate the needle object before animate it but the result still the same.

1. the neddle its on 0,0,0 coordinate with origin in the middle facing -Z (towards the player)
2. the speedometer have slope part in it around 35 degreeĀ 

in the animated file i wrote the needle like this:

[object]
states = needle.b3d
position = 0.732, 1.94, 9.35
rotatezdirection = 0, 0, -1
rotatezdamping = 20,1
rotatezfunction = abs[speedometer[0]] / 32.5 * (4.53)

i just want the needle to tilt a bit along its X axis/ same degree as the cab slope but i dont know how to do it.

ADbve

Posts : 72
Join date : 2020-05-14

Back to top Go down

how to animate a speedometer needle on 3d cab ? Empty Re: how to animate a speedometer needle on 3d cab ?

Post by Midnight Express Ginga81 Fri Feb 11, 2022 8:54 am

I think that degree is have to change to radian.
radian= digree*3.1415926535...(pie)/180
For example, at the speedmeter...
RotateZFunction = 2.11 - abs[speedometer[0]] * 0.0945
2.11=120.8941 digree
0.0945=5.41445116 digree

Midnight Express Ginga81

Posts : 143
Join date : 2016-09-25

Back to top Go down

Back to top

- Similar topics

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