Jump to content

[SOLVED]VEX Code for $FPS?


Atom

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
Link to comment
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
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...