Atom Posted September 17, 2015 Share Posted September 17, 2015 (edited) HI All, I have a line of VEX code that calculates the current time. I could not find the attribute for $FPS so I just left that as hscript. float current_time = @Frame/`$FPS`; // Current time in seconds. I would like this to be 100% VEX. Does anyone know what the vex equivalent of $FPS is? Edited September 18, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
Skybar Posted September 17, 2015 Share Posted September 17, 2015 If you just want the time, you have the global variable @Time.. Quote Link to comment Share on other sites More sharing options...
old school Posted September 17, 2015 Share Posted September 17, 2015 @Time is what you want. To answer your question, there is @TimeInc which is the time between frames or substeps. The reciprocal or 1/@TimeInc is equivalent to $FPS so there you go. The key in the above statement is the time between "substeps". When working with foreach workflows or simulation type workflows, you should bias all your time based attributes with @TimeInc fyi. Protects you from those times you deploy substepping. 6 Quote Link to comment Share on other sites More sharing options...
Atom Posted September 17, 2015 Author Share Posted September 17, 2015 Great, thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.