diff --git a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLYR.cs b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLYR.cs index 62012bbb..b03971ea 100644 --- a/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLYR.cs +++ b/IndustrialPark/Assets/ObjectAssets/ClickableAssets/PlaceableAssets/AssetPLYR.cs @@ -43,8 +43,11 @@ public override void Draw(SharpRenderer renderer) { if (DontRender || isInvisible) return; + Vector4 Color = _color; + Color.W = Color.W == 0f ? 1f : Color.W; + if (ArchiveEditorFunctions.renderingDictionary.ContainsKey(_modelAssetID)) - ArchiveEditorFunctions.renderingDictionary[_modelAssetID].Draw(renderer, world, isSelected ? renderer.selectedObjectColor * _color : _color); + ArchiveEditorFunctions.renderingDictionary[_modelAssetID].Draw(renderer, world, isSelected ? renderer.selectedObjectColor * Color : Color); else renderer.DrawPyramid(world, isSelected, 1f); } diff --git a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaPointer.cs b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaPointer.cs index 541d50da..469f90e0 100644 --- a/IndustrialPark/Assets/ObjectAssets/DYNA/DynaPointer.cs +++ b/IndustrialPark/Assets/ObjectAssets/DYNA/DynaPointer.cs @@ -141,28 +141,6 @@ public override float GetDistance(Vector3 cameraPosition) return null; } - private float? TriangleIntersection(Ray r, float initialDistance) - { - if (triangles == null) - return initialDistance; - - bool hasIntersected = false; - float smallestDistance = 1000f; - - foreach (RenderWareFile.Triangle t in triangles) - if (r.Intersects(ref vertices[t.vertex1], ref vertices[t.vertex2], ref vertices[t.vertex3], out float distance)) - { - hasIntersected = true; - - if (distance < smallestDistance) - smallestDistance = distance; - } - - if (hasIntersected) - return smallestDistance; - return null; - } - private float? TriangleIntersection(Ray r, float initialDistance, List triangles, List vertices) { bool hasIntersected = false;