merge fix

This commit is contained in:
UbitUmarov
2025-06-20 04:48:58 +01:00
parent e1b5f3ad81
commit 403158df06
2 changed files with 2 additions and 3 deletions

View File

@@ -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;

View File

@@ -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);