From ff450d29da9d8a551fc244f23f5da4645c26dc91 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 13 Jun 2012 01:59:54 +0200 Subject: Add detecting non-physical phantoms back into raycast --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 065d3df..22d62f7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -12139,9 +12139,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api results.Add(r); } - // bug: will not detect phantom unless they are physical - // don't use ObjectIntersection because its also bad - + // TODO: Replace this with a better solution. ObjectIntersection can only + // detect nonphysical phantoms. They are detected by virtue of being + // nonphysical (e.g. no PhysActor) so will not conflict with detecting + // physicsl phantoms as done by the physics scene + // We don't want anything else but phantoms here. + if (detectPhantom) + { + ContactResult[] objectHits = ObjectIntersection(rayStart, rayEnd, false, false, true); + foreach (ContactResult r in objectHits) + results.Add(r); + } } else { -- cgit v1.1