Fix decal projection being scaled twice

This commit is contained in:
Andrew Cassidy 2020-06-01 16:54:07 -07:00
parent d54887414f
commit e4e099618d
4 changed files with 11 additions and 11 deletions

View File

@ -1,11 +1,11 @@
Localization Localization
{ {
en-us en-us
{ {
#LOC_ConformalDecals_gui_scale = Scale #LOC_ConformalDecals_gui-scale = Scale
#LOC_ConformalDecals_gui_depth = Depth #LOC_ConformalDecals_gui-depth = Depth
#LOC_ConformalDecals_gui_opacity = Opacity #LOC_ConformalDecals_gui-opacity = Opacity
#LOC_ConformalDecals_gui_cutoff = Cutoff #LOC_ConformalDecals_gui-cutoff = Cutoff
#LOC_ConformalDecals_gui_aspect-ratio = Aspect Ratio #LOC_ConformalDecals_gui-aspectratio = Aspect Ratio
} }
} }

View File

@ -13,11 +13,11 @@ namespace ConformalDecals {
UI_FloatRange(minValue = 0.05f, maxValue = 4f, stepIncrement = 0.05f)] UI_FloatRange(minValue = 0.05f, maxValue = 4f, stepIncrement = 0.05f)]
public float depth = 1.0f; public float depth = 1.0f;
[KSPField(guiName = "#LOC_ConformalDecals_gui-opacity", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"), [KSPField(guiName = "#LOC_ConformalDecals_gui-opacity", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "P0"),
UI_FloatRange(minValue = 0.0f, maxValue = 1f, stepIncrement = 0.05f)] UI_FloatRange(minValue = 0.0f, maxValue = 1f, stepIncrement = 0.05f)]
public float opacity = 1.0f; public float opacity = 1.0f;
[KSPField(guiName = "#LOC_ConformalDecals_gui-cutoff", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"), [KSPField(guiName = "#LOC_ConformalDecals_gui-cutoff", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "P0"),
UI_FloatRange(minValue = 0.0f, maxValue = 1f, stepIncrement = 0.05f)] UI_FloatRange(minValue = 0.0f, maxValue = 1f, stepIncrement = 0.05f)]
public float cutoff = 0.5f; public float cutoff = 0.5f;
@ -97,7 +97,7 @@ namespace ConformalDecals {
// find projector transform // find projector transform
if (string.IsNullOrEmpty(decalProjector)) { if (string.IsNullOrEmpty(decalProjector)) {
decalProjectorTransform = part.transform.Find("model"); decalProjectorTransform = part.transform;
} }
else { else {
decalProjectorTransform = part.FindModelTransform(decalProjector); decalProjectorTransform = part.FindModelTransform(decalProjector);