From 8217bbe484eb660a5aa782e63af005825b43e7e6 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 21 May 2008 05:46:32 +0000 Subject: * Fixed needing to alter your sculptie sometimes to get physics to generate a collision mesh for it. * Sculpties load on startup reliably now and successfully generate a collision mesh as soon as the sculpt texture is available. --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index ef2934d..f5d3618 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1933,7 +1933,10 @@ namespace OpenSim.Region.Environment.Scenes m_shape.SculptData = texture.Data; if (PhysActor != null) { - PhysActor.Shape = m_shape; + // Tricks physics engine into thinking we've changed the part shape. + PrimitiveBaseShape m_newshape = m_shape.Copy(); + PhysActor.Shape = m_newshape; + m_shape = m_newshape; } } } -- cgit v1.1