Jump to content
Sign in to follow this  
Atom

[SOLVED]VEX Code for $FPS?

Recommended Posts

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 by Atom

Share this post


Link to post
Share on other sites

@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.

  • Like 6

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×