anim Posted January 28, 2014 Share Posted January 28, 2014 Lastly when should I be using Timeinc in my code? I didn't realized I had to here. it all comes to understanding of the data you need to manipulate and how the solver is using it so for example v stores distance per second but the introduced P displacement by snapping it to the surface was done in each timestep and v from that would be distance per timestep so to convert it to distance per second you need to divide it by timestep which is represented by @Timeinc and contains currently simulated fraction of the time the whole timestep handling is necessary because it's variable and depends on your FPS and number of substeps, but you expect similar results per second so this conversion is crucial So if I had to update force, I would use Timeinc there too? in this case yes, it would be the same, the force from the displacement would be just per timestep you need to convert it to per second as solver will multiply force by @Timeinc (and divide by @mass if desired) before adding to v to properly add acceleration each timestep but in case you are setting force that is already in seconds then no If that's the case, should you also be using it in VEXpressions to change parameter values? usually no, parameters represent values per second so you want to work with them like that or even if the values are not per second, they are usually being adjusted internally to account for timestep you should treat VEXpressions on parameters as literally just setting values of that parameter per particle 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted January 29, 2014 Author Share Posted January 29, 2014 Thanks anim, it makes a lot more sense now 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.