Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
elchtest mod :)
03-11-2010, 02:00 AM,
#53
 
sebiastisch Wrote:* normal -> has nothing to do with collision itself? just the normal on the surface at the collision point?
That is correct.

Quote:* Position-> Is it correct to just take the deepest point of the collision of the wheel (with positions from getWheelPosition and orientation from getWheelOrientation)?

As long as you're absolutely sure that's the deepest point of collision, then that's fine.

If that doesns't work, you could give this a try: if you have the deepest point of the collision in a variable called "deepest_point", the current wheel center in a variable called "center", and the normal of the surface at the collision point in a variable called "normal", here's the way I would compute this:
Code:
float d = (-normal).dot(deepest_point);
MATHPLANE <float> plane(normal[0], normal[1], normal[2], d);
MATHVECTOR <float, 3> position = center - normal*plane.DistanceToPoint(center);
Although thinking about this more this might not work well, so ... ignore that!

Quote:* Wheelheight-> It is a projection from the {colPoint to the wheel center point vector} to the {average direction of suspension displacement}. what do you mean by the latter?
I interpreted something like: ( wheelCenter-colPoint) x ( (0,0,-1).rotate(wheelOrientationFloating) )
Not sure, whether this makes sense....
Yes, that's what I meant. The "x" that you put in there would need to be a dot product, of course.

Quote:I especially don't know where to get the following from:
Quote:the position where the tire patch would touch the road if the suspension were deflected as far as needed to cause the tire to touch the ground
I can only collide the wheel in the position it is and not get the point, where it would collide if it was deflected correctly.

Yes, that's a good point! You can't really determine the point where it would collide if it was deflected correctly by only doing a single collision check with a cylinder. With ray casts it's easy because you're basically approximating the tire as a point and testing a line segment. The line segment is the shape that a point would make as it is swept through the suspension displacement. So maybe what you need to test is a shape that represents the area that would be swept out by a cylinder moving through suspension displacement. Maybe a capsule..? I think I remember reading Bullet does support swept collisions, maybe you could use that directly to test a swept cylinder shape?

As a side note, the reason that VDrift needs the tire contact point where it would collide with the road if the suspension was deflected correctly is because VDrift doesn't simulate the wheel as a separate rigid body with its own (non-rotational) inertia. This is (in my mind) the biggest limitation of the current physics approach because it doesn't simulate unsprung weight and its effects. If you or NaN is so inclined, you could always try implementing this, although it'd be hairy....

Quote:Shouldn't the tread change with the tire contact? I think it is not used at all (set to zero in all .car files).

The tread value isn't meant to represent the area of the tire contact or anything like that, it's just supposed to be a property of the tire on a spectrum from zero (no tread racing tires) to 1 (offroad tires). It's a hack I added and sort of regret now, so I recommend just ignoring it. The effect that you're probably interested in (changing tire friction as the tire contact patch changes) is modeled pretty completely with the pacejka equation.
Reply


Messages In This Thread
elchtest mod :) - by NaN - 02-04-2010, 12:04 PM
[No subject] - by NaN - 02-04-2010, 01:01 PM
[No subject] - by NaN - 02-04-2010, 02:16 PM
[No subject] - by nomoo - 02-04-2010, 02:41 PM
[No subject] - by joevenzon_phpbb2_import3 - 02-05-2010, 11:29 AM
[No subject] - by NaN - 02-05-2010, 11:39 AM
[No subject] - by NaN - 02-05-2010, 01:10 PM
[No subject] - by NaN - 02-05-2010, 04:15 PM
[No subject] - by joevenzon_phpbb2_import3 - 02-06-2010, 12:25 AM
[No subject] - by NaN - 02-10-2010, 08:37 AM
[No subject] - by NaN - 02-10-2010, 11:25 AM
[No subject] - by portets - 02-10-2010, 06:58 PM
[No subject] - by NaN - 02-10-2010, 07:36 PM
[No subject] - by portets - 02-10-2010, 08:19 PM
[No subject] - by NaN - 02-20-2010, 05:47 PM
[No subject] - by CrystalH - 02-21-2010, 12:52 PM
[No subject] - by NaN - 02-21-2010, 01:45 PM
[No subject] - by joevenzon_phpbb2_import3 - 02-22-2010, 02:01 AM
[No subject] - by sebiastisch - 02-22-2010, 10:45 AM
[No subject] - by joevenzon_phpbb2_import3 - 02-22-2010, 11:22 AM
[No subject] - by sebiastisch - 02-22-2010, 12:02 PM
[No subject] - by NaN - 02-22-2010, 12:56 PM
[No subject] - by sebiastisch - 02-22-2010, 01:00 PM
[No subject] - by NaN - 02-22-2010, 01:09 PM
[No subject] - by sebiastisch - 02-22-2010, 01:14 PM
[No subject] - by NaN - 02-23-2010, 03:38 AM
[No subject] - by joevenzon_phpbb2_import3 - 02-23-2010, 11:20 AM
[No subject] - by NaN - 02-25-2010, 03:47 PM
[No subject] - by NaN - 02-25-2010, 04:50 PM
[No subject] - by sebiastisch - 02-25-2010, 06:43 PM
[No subject] - by NaN - 02-27-2010, 03:24 PM
[No subject] - by sebiastisch - 02-28-2010, 08:24 AM
[No subject] - by joevenzon_phpbb2_import3 - 02-28-2010, 01:46 PM
[No subject] - by joevenzon_phpbb2_import3 - 02-28-2010, 01:56 PM
[No subject] - by NaN - 02-28-2010, 02:04 PM
[No subject] - by NaN - 02-28-2010, 05:57 PM
[No subject] - by sebiastisch - 02-28-2010, 07:20 PM
[No subject] - by sebiastisch - 03-03-2010, 10:10 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-03-2010, 11:39 AM
[No subject] - by sebiastisch - 03-03-2010, 12:43 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-03-2010, 11:29 PM
[No subject] - by sebiastisch - 03-04-2010, 05:08 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-04-2010, 11:42 AM
[No subject] - by sebiastisch - 03-04-2010, 12:43 PM
[No subject] - by NaN - 03-05-2010, 09:17 AM
[No subject] - by NaN - 03-05-2010, 01:44 PM
[No subject] - by sebiastisch - 03-05-2010, 02:25 PM
[No subject] - by sebiastisch - 03-06-2010, 09:19 AM
[No subject] - by NaN - 03-08-2010, 11:28 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-08-2010, 11:11 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-08-2010, 11:24 PM
[No subject] - by sebiastisch - 03-09-2010, 06:55 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-11-2010, 02:00 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-11-2010, 02:05 AM
[No subject] - by sebiastisch - 03-11-2010, 09:43 AM
[No subject] - by sebiastisch - 03-11-2010, 09:45 AM
[No subject] - by NaN - 03-11-2010, 03:04 PM
[No subject] - by sebiastisch - 03-15-2010, 06:50 AM
[No subject] - by NaN - 03-15-2010, 03:26 PM
[No subject] - by sebiastisch - 03-16-2010, 08:13 AM
[No subject] - by NaN - 03-16-2010, 12:50 PM
[No subject] - by sebiastisch - 03-16-2010, 01:15 PM
[No subject] - by NaN - 03-16-2010, 01:30 PM
[No subject] - by sebiastisch - 03-20-2010, 07:38 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-20-2010, 12:10 PM
[No subject] - by NaN - 03-22-2010, 12:19 PM
[No subject] - by sebiastisch - 03-30-2010, 10:37 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)