changing image (ani...
 
Notifications
Clear all

changing image (animation) frame with pedal input?

2 Posts
1 Users
0 Reactions
933 Views
(@pront)
Active Member
Joined: 4 years ago
Posts: 7
Topic starter  

I have a multi-frame animation I want to change with pedal input but I'm really new to this. The first way I'd think of doing it is to translate an atlas texture strip X pixels on X pedal pressure but I'm not sure I can do that in a step in Simhub and I'm not sure if this is the most efficient way to go about this. Any help appreciated


   
Quote
Topic Tags
(@pront)
Active Member
Joined: 4 years ago
Posts: 7
Topic starter  

ok - I figured it out. If I use Javascript expression on the vertical translation, I can do a rough animation using a filmstrip like this:

if ($prop('DataCorePlugin.ExternalScript.Steering_Wheel_Angle') < -23) {
return -168
}
if ($prop('DataCorePlugin.ExternalScript.Steering_Wheel_Angle') < -79) {
return -224
}
if ($prop('DataCorePlugin.ExternalScript.Steering_Wheel_Angle') < 23) {
return -112
}
if ($prop('DataCorePlugin.ExternalScript.Steering_Wheel_Angle') > 23) {
return -56
}

 


   
ReplyQuote
Share: