From 403158df060a22e357d0f19ca1f59f41bb4f086f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 20 Jun 2025 04:48:58 +0100 Subject: [PATCH] merge fix --- OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs | 2 -- OpenSim/Region/PhysicsModules/BulletS/BSScene.cs | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs b/OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs index fdd332704e..14cceff63e 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSLinksetCompound.cs @@ -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; diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs index 9e0e5d6fdf..a6cda54f04 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSScene.cs @@ -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);