BulletSim: fix vehicles being shot in the air at border crossings because of mis-application of correction to postion for below groundness.
parent
2b8efa24dd
commit
021623a17d
|
@ -871,8 +871,11 @@ namespace OpenSim.Region.Physics.BulletSPlugin
|
|||
if (VehiclePosition.Z < GetTerrainHeight(VehiclePosition))
|
||||
{
|
||||
// TODO: correct position by applying force rather than forcing position.
|
||||
VehiclePosition += new Vector3(0f, 0f, GetTerrainHeight(VehiclePosition) + 2f);
|
||||
VDetailLog("{0}, MoveLinear,terrainHeight,terrainHeight={1},pos={2}", Prim.LocalID, GetTerrainHeight(VehiclePosition), VehiclePosition);
|
||||
Vector3 newPosition = VehiclePosition;
|
||||
newPosition.Z = GetTerrainHeight(VehiclePosition) + 1f;
|
||||
VehiclePosition = newPosition;
|
||||
VDetailLog("{0}, MoveLinear,terrainHeight,terrainHeight={1},pos={2}",
|
||||
Prim.LocalID, GetTerrainHeight(VehiclePosition), VehiclePosition);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue