ok, need help.... :facepalm:
i'm most horribly confused on a matter of simple physics... yet, those assumably-simple things are often those that give me most trouble, since no-one bothers write about them, i gather :shrug:
anyways... when calculating the torque generated upon a surface impact, how does one go about conserving total momentum?
i mean... if an object hits a surface at a point out of alignment with it's center-of-mass (they most usually do), it should get torque applied to it proportionally to the cross-product of the acceleration and offset vectors, right?
but then - would that not have an impact on the final acceleration itself?
how is that calculated? can't get my thick, miss-educated head around it....
the purpose here is to assemble a motorbike-trials-type game (job)... i mean to solve collisions from the wheels for the bike as a whole, eliminating the bike-buckles problem that one commonly finds in games of this sort, which typically use a compound structure to simulate the bike....
so what i'm trying to do, is to calculate the impuse generated by the wheels contacting the ground and appliying that as a force on the bikes "root object"
for the impulse, i simply load up the contact surface normal into a rotation matrix and transform the (already calculated) global-velocirty of the wheel into "surface space"
then, things get very one-dimensional, since after the transorm i have X for surface velocity and Y for vertical speed, regardless of the surface orientation....
so that already seems to work... after un-transforming the "bumped" accel vector back into world-coordinates, i get a nice bounce-off from the surface, wherever i hit it....
but i struck solid rock when trying to account for torque as well....
it's rather simple to calculate it... for the wheels, the torque is just defined as the tangent velocity (X) divided by the wheel radius (and a little friction multiplier to allow some slipping)
but after i have it - i don't know how to deal with it...
ok, i apply it as torque, which makes the wheel spin... yet, if it spins, should it not "divert energy" from the resulting linear acceleration?
or is angular momentum always treated separately? (not making sense to me)
anyways, for the bike as a whole, it's the same problem... i can get the correct torque value simply by getting a cross-product from the wheel's resulting linear acceleration (which is then ignored for the wheel itself since it's a part of the rig) and the relative position of the CoG from the contact point...
then at this point, i have two degrees of the same problem... for one, the bike torque is known to be off, since i'm calculating it from what i believe is a "wrong" impulse...
and then, for the same reason the impulse is "wrong", the resulting linear accel on the bike is enough to make Newton turn in his grave...
the bike blasts off into variable-popping speeds upon the softest contact with the ground... quite shameful to see :blush:
i tried subtracting the torque from the X and Y components of the accel...
i also tried "stretching" the accel vector by normalizing and multiplying by the difference between the distance and the torque value...
something is not right... i can't seem to get it figured out...
on the Orbiter API guide, Martin says the torque is applied using the "trapezoid rule"... what is that? - could it be what i'm looking for here?
thanks in advance
i'm most horribly confused on a matter of simple physics... yet, those assumably-simple things are often those that give me most trouble, since no-one bothers write about them, i gather :shrug:
anyways... when calculating the torque generated upon a surface impact, how does one go about conserving total momentum?
i mean... if an object hits a surface at a point out of alignment with it's center-of-mass (they most usually do), it should get torque applied to it proportionally to the cross-product of the acceleration and offset vectors, right?
but then - would that not have an impact on the final acceleration itself?
how is that calculated? can't get my thick, miss-educated head around it....
the purpose here is to assemble a motorbike-trials-type game (job)... i mean to solve collisions from the wheels for the bike as a whole, eliminating the bike-buckles problem that one commonly finds in games of this sort, which typically use a compound structure to simulate the bike....
so what i'm trying to do, is to calculate the impuse generated by the wheels contacting the ground and appliying that as a force on the bikes "root object"
for the impulse, i simply load up the contact surface normal into a rotation matrix and transform the (already calculated) global-velocirty of the wheel into "surface space"
then, things get very one-dimensional, since after the transorm i have X for surface velocity and Y for vertical speed, regardless of the surface orientation....
so that already seems to work... after un-transforming the "bumped" accel vector back into world-coordinates, i get a nice bounce-off from the surface, wherever i hit it....
but i struck solid rock when trying to account for torque as well....
it's rather simple to calculate it... for the wheels, the torque is just defined as the tangent velocity (X) divided by the wheel radius (and a little friction multiplier to allow some slipping)
but after i have it - i don't know how to deal with it...
ok, i apply it as torque, which makes the wheel spin... yet, if it spins, should it not "divert energy" from the resulting linear acceleration?
or is angular momentum always treated separately? (not making sense to me)
anyways, for the bike as a whole, it's the same problem... i can get the correct torque value simply by getting a cross-product from the wheel's resulting linear acceleration (which is then ignored for the wheel itself since it's a part of the rig) and the relative position of the CoG from the contact point...
then at this point, i have two degrees of the same problem... for one, the bike torque is known to be off, since i'm calculating it from what i believe is a "wrong" impulse...
and then, for the same reason the impulse is "wrong", the resulting linear accel on the bike is enough to make Newton turn in his grave...
the bike blasts off into variable-popping speeds upon the softest contact with the ground... quite shameful to see :blush:
i tried subtracting the torque from the X and Y components of the accel...
i also tried "stretching" the accel vector by normalizing and multiplying by the difference between the distance and the torque value...
something is not right... i can't seem to get it figured out...
on the Orbiter API guide, Martin says the torque is applied using the "trapezoid rule"... what is that? - could it be what i'm looking for here?
thanks in advance