Jump to content

  • Log In with Google      Sign In   
  • Create Account

Kazade

Member Since 01 Feb 2004
Offline Last Active Aug 20 2016 07:23 AM

Posts I've Made

In Topic: Upward force calculation for raycast/ground collision

16 August 2016 - 03:01 PM

Randy, I'm not sure what you mean about fixing up the velocity, could you elaborate? Thanks!


In Topic: Upward force calculation for raycast/ground collision

16 August 2016 - 01:51 PM

Thanks Randy, that's really helpful. I think I'm basically doing the right thing but something else is wrong... I realized I should probably be dividing impulse by the timestep right? (e.g. * (1/60))


In Topic: Upward force calculation for raycast/ground collision

16 August 2016 - 07:25 AM

OK, I'm having much more trouble with this than I expected...

 

Say that 3 "wheels" intersect with the terrain, and I have their intersection points, penetration depths and impact normals, I assumed that I could move the car back a little bit so it wasn't intersecting, and then apply impulses at each of the 3 points (using the velocities at those points multiplied by the mass) to orient the vehicle with the terrain. In my mind that would work just as you'd expect - except that doesn't work at all - the car just flips around and flies into the air.

 

Can anyone give me some guidance on how to calculate the impulses to apply at each wheel? Also, what vector should I be using to move the car so that it's not intersecting? I figured I'd just move it by the greatest penetration depth of all the wheels, but then should I only apply an impulse on the wheel with the deepest penetration?


In Topic: Upward force calculation for raycast/ground collision

14 August 2016 - 09:05 AM

Yeah, you're totally right. I should move the body first by the direction of the floor's normal * the penetration depth. Then apply an impulse of the reverse of the velocity projected onto the normal.

 

I was thinking I could do everything with impulses, but I'm not sure that's possible (you need to move the body from penetrating in a single step and changing the velocity isn't going to help with that).


In Topic: Rotate to face a direction, by applying angular acceleration?

30 December 2013 - 03:02 AM

@Mike, just a few questions about that equation:

  • Is "timestep" the fractional 1/60.0 or the number of steps in a second (e.g. 60)?
  • Is "angle", the result of acos(desired.dot(current)) ?
  • Is "angular velocity" the current angular velocity of the ship?
  • What's "moment of inertia"?

Sorry if I'm being dumb :)


PARTNERS