Olivier Thériault

olivierth

About Me

Expertise
Not Specified
Location
Canada

Connect

Recent Forum Posts

Vex gravity in fps (instead of seconds)? July 31, 2019, 7:03 p.m.

Oh wow! All that time I kept thinking it should reach 9.8m (distance) instead of 9.8m/s speed! DOH!

Thanks for the info!

-Olivier

Vex gravity in fps (instead of seconds)? July 28, 2019, 1:34 p.m.

Hi!

I tried the solver version of the code and tweaked it to fit my needs. After 24 frames my points is at -5.10763 (started at 0 with no velocity). …I'm guessing it should be at -9.8 after a second. What am I doing wrong?

v@vel;
vector Pref = @P;
vector velRef = @vel;

float Gstrength = chf("gravity_ms2");  // 9.80665
vector Gdir = normalize(set(0, -1, 0));
vector G = Gdir * (Gstrength * (@TimeInc * @TimeInc));  //convert to frames instead of seconds

@vel += G;
@P += @vel;

if(@Frame == 1)
    {
    @P = Pref;
    @vel = velRef;
    }

Vex gravity in fps (instead of seconds)? July 28, 2019, 11:30 a.m.

Wow, thanks for all the explaining! And yes, I was trying to use this inside a Solver.

Now back to dropping points!

-Olivier