mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
merge fix
This commit is contained in:
@@ -356,10 +356,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS
|
||||
// Bullet presumes an object's origin (relative <0,0,0>) is its center-of-mass
|
||||
OMV.Vector3 centerOfMassW = ComputeLinksetCenterOfMass();
|
||||
|
||||
OMV.Quaternion invRootOrientation = OMV.Quaternion.Normalize(OMV.Quaternion.Inverse(LinksetRoot.RawOrientation));
|
||||
OMV.Vector3 origRootPosition = LinksetRoot.RawPosition;
|
||||
OMV.Quaternion invRootOrientation = OMV.Quaternion.Inverse(LinksetRoot.RawOrientation);
|
||||
invRootOrientation.Normalize();
|
||||
|
||||
// 'centerDisplacementV' is the vehicle relative distance from the simulator root position to the center-of-mass
|
||||
OMV.Vector3 centerDisplacementV = (centerOfMassW - LinksetRoot.RawPosition) * invRootOrientation;
|
||||
|
||||
@@ -1081,7 +1081,8 @@ namespace OpenSim.Region.PhysicsModule.BulletS
|
||||
lock (PhysicsEngineLock)
|
||||
{
|
||||
Vector3 posFrom = position;
|
||||
Vector3 posTo = Vector3.Normalize(direction) * length + position;
|
||||
direction.Normalize();
|
||||
Vector3 posTo = direction * length + position;
|
||||
DetailLog("{0},RaycastWorld,RayTest2,from={1},to={2}",
|
||||
DetailLogZero, posFrom, posTo);
|
||||
RaycastHit hitInfo = PE.RayTest2(World, posFrom, posTo, collisionFilter, collisionMask);
|
||||
|
||||
Reference in New Issue
Block a user