Body of raycast vehicle penetrates the highroad
-
- Posts: 5
- Joined: Thu Jun 14, 2012 2:15 pm
Body of raycast vehicle penetrates the highroad
I am experiencing a strange problem with my bullet raycast vehicle. I have copied all the settings from VehicleDemo in size, suspension, etc. I add a triangle mesh as a highroad to the scene and dump the vehicle from a certain height. The wheels ( rays ) together with the body interpenetrates the highroad and remain suspended. Attached is a print screen with the problem.
I am new to bullet and simply took the VehicleDemo sample with no other additions / modifications. I was expecting to just stop on the mesh like in the sample.
Any suggestion appreciated.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 5
- Joined: Thu Jun 14, 2012 2:15 pm
Re: Body of raycast vehicle penetrates the highroad
I have set the wheels connection points at a little higher level that the chassis height and set the suspension rest length to be shorter that the distance from the wheel's connection point to the road.
My question: why the body penetrates the highroad and what can I do to prevent this?
wheel is:
- wheel {m_raycastInfo={...} m_worldTransform={...} m_chassisConnectionPointCS={...} ...} btWheelInfo &
+ m_raycastInfo {m_contactNormalWS={...} m_contactPointWS={...} m_suspensionLength=-9.2559631349317831e+061 ...} btWheelInfo::RaycastInfo
+ m_worldTransform {m_basis={...} m_origin={...} } btTransform
- m_chassisConnectionPointCS {m_floats=0x05705360 } btVector3
- m_floats 0x05705360 double [4]
[0] 1.0323333740234375 double
[1] 1.1000000238418579 double
[2] 1.8840000629425049 double
[3] 0.00000000000000000 double
+ m_wheelDirectionCS {m_floats=0x05705380 } btVector3
+ m_wheelAxleCS {m_floats=0x057053a0 } btVector3
m_suspensionRestLength1 0.80000001192092896 double
m_maxSuspensionTravelCm 21.500000357627869 double
m_wheelsRadius 0.43000000715255737 double
m_suspensionStiffness 60.000000000000000 double
m_wheelsDampingCompression 3.4000000953674316 double
m_wheelsDampingRelaxation 10.300000190734863 double
m_frictionSlip 3.5000000000000000 double
m_steering 0.00000000000000000 double
m_rotation 0.00000000000000000 double
m_deltaRotation 0.00000000000000000 double
m_rollInfluence 0.10000000149011612 double
m_maxSuspensionForce 226000.00000000000 double
m_engineForce 0.00000000000000000 double
m_brake 0.00000000000000000 double
m_bIsFrontWheel true bool
m_clientInfo 0xcccccccc void *
m_clippedInvContactDotSuspension -9.2559631349317831e+061 double
m_suspensionRelativeVelocity -9.2559631349317831e+061 double
m_wheelsSuspensionForce -9.2559631349317831e+061 double
m_skidInfo -9.2559631349317831e+061 double
Result can be seen in the picture. Any help appreciated.
My question: why the body penetrates the highroad and what can I do to prevent this?
wheel is:
- wheel {m_raycastInfo={...} m_worldTransform={...} m_chassisConnectionPointCS={...} ...} btWheelInfo &
+ m_raycastInfo {m_contactNormalWS={...} m_contactPointWS={...} m_suspensionLength=-9.2559631349317831e+061 ...} btWheelInfo::RaycastInfo
+ m_worldTransform {m_basis={...} m_origin={...} } btTransform
- m_chassisConnectionPointCS {m_floats=0x05705360 } btVector3
- m_floats 0x05705360 double [4]
[0] 1.0323333740234375 double
[1] 1.1000000238418579 double
[2] 1.8840000629425049 double
[3] 0.00000000000000000 double
+ m_wheelDirectionCS {m_floats=0x05705380 } btVector3
+ m_wheelAxleCS {m_floats=0x057053a0 } btVector3
m_suspensionRestLength1 0.80000001192092896 double
m_maxSuspensionTravelCm 21.500000357627869 double
m_wheelsRadius 0.43000000715255737 double
m_suspensionStiffness 60.000000000000000 double
m_wheelsDampingCompression 3.4000000953674316 double
m_wheelsDampingRelaxation 10.300000190734863 double
m_frictionSlip 3.5000000000000000 double
m_steering 0.00000000000000000 double
m_rotation 0.00000000000000000 double
m_deltaRotation 0.00000000000000000 double
m_rollInfluence 0.10000000149011612 double
m_maxSuspensionForce 226000.00000000000 double
m_engineForce 0.00000000000000000 double
m_brake 0.00000000000000000 double
m_bIsFrontWheel true bool
m_clientInfo 0xcccccccc void *
m_clippedInvContactDotSuspension -9.2559631349317831e+061 double
m_suspensionRelativeVelocity -9.2559631349317831e+061 double
m_wheelsSuspensionForce -9.2559631349317831e+061 double
m_skidInfo -9.2559631349317831e+061 double
Result can be seen in the picture. Any help appreciated.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 66
- Joined: Sun Jan 30, 2011 8:46 pm
Re: Body of raycast vehicle penetrates the highroad
Does it work with the settings in the vehicle demo ?
-
- Posts: 5
- Joined: Thu Jun 14, 2012 2:15 pm
Re: Body of raycast vehicle penetrates the highroad
yes, in VehicleDemo it works. After some searching I have found out that, if I create the rigid body of the chassis only with the btBoxShape than it works, but if I create the rigid body with btCompoundShape than it starts to penetrate the ground.
Another question: why does the vehicle start to "fall" upwards ( also in VehicleDemo ) when I modify line 345 in VehicleDemo.cpp to
float connectionHeight = 1.8f;
?
Another question: why does the vehicle start to "fall" upwards ( also in VehicleDemo ) when I modify line 345 in VehicleDemo.cpp to
float connectionHeight = 1.8f;
?
-
- Posts: 66
- Joined: Sun Jan 30, 2011 8:46 pm
Re: Body of raycast vehicle penetrates the highroad
Th connection height is whats shown below :
http://www.bulletphysics.org/mediawiki- ... attach.jpg
Its the height from the chassis bottom. You probably should not set it to more than the height of the box shape.
Also the chassis shape is a compound shape. It should work. I have added a lot more shapes than a simple box and have it working - even convex hulls.
http://www.bulletphysics.org/mediawiki- ... attach.jpg
Its the height from the chassis bottom. You probably should not set it to more than the height of the box shape.
Also the chassis shape is a compound shape. It should work. I have added a lot more shapes than a simple box and have it working - even convex hulls.