- Messages
- 468
- Country

I have been trying to code a dummy knob/rotating disc for my model and as usual I've hit problems. 
The part is actually the cabin heat control and consists of a flat disc that protrudes slightly through the panel fascia.
I can get the disc to rotate it but it just jumps from the start point in the animation to the end point. I have searched for code examples and tried adapting existing code I have for knobs but nothing seems to work.
I have posted the current code I am using below, the animation is over 100 frames and it's KF'd at 0, 50 and 100:
The 'Random_2' tag is one I got from some code on FFDS, it could be 'fried bananas' for that matter as it doesn't actually do anything in the sim. I used 'Random_1' in another dummy knob (the cabin heat on/off) and it works fine.
Can anyone see why I cant get a smooth, gradual movement on the part using either the mouse wheel or a left-click/drag operation?
The part is actually the cabin heat control and consists of a flat disc that protrudes slightly through the panel fascia.
I can get the disc to rotate it but it just jumps from the start point in the animation to the end point. I have searched for code examples and tried adapting existing code I have for knobs but nothing seems to work.
I have posted the current code I am using below, the animation is over 100 frames and it's KF'd at 0, 50 and 100:
Code:
<PartInfo>
<Name>cabin_temp</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(L:random_2, enum) 100 *
</Code>
<Lag>100</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Cabin Temp</TooltipText>
<CallbackCode>
(L:random_2, enum) ! (>L:random_2, enum)
</CallbackCode>
<MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
<Variable>RANDOM_2</Variable>
<Units>percent</Units>
<Scale>163.84</Scale>
<YScale>-163.84</YScale>
<MinValue>-16384</MinValue>
<MaxValue>16384</MaxValue>
</MouseRect>
</PartInfo>
The 'Random_2' tag is one I got from some code on FFDS, it could be 'fried bananas' for that matter as it doesn't actually do anything in the sim. I used 'Random_1' in another dummy knob (the cabin heat on/off) and it works fine.
Can anyone see why I cant get a smooth, gradual movement on the part using either the mouse wheel or a left-click/drag operation?
Last edited:



