Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2463 by just changing which shader #2468

Merged
merged 1 commit into from
Mar 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/kOS/Suffixed/VectorRenderer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using kOS.Safe;
using kOS.Safe;
using kOS.Safe.Encapsulation;
using kOS.Safe.Encapsulation.Suffixes;
using kOS.Safe.Execution;
Expand Down Expand Up @@ -340,16 +340,18 @@ public void SetShow(BooleanValue newShowVal)

line = lineObj.AddComponent<LineRenderer>();
hat = hatObj.AddComponent<LineRenderer>();
//TODO: 1.1 TODO
label = labelObj.GetComponent<GUIText>();

line.useWorldSpace = false;
hat.useWorldSpace = false;

GetShipCenterCoords();

line.material = new Material(Shader.Find("Particles/Additive"));
hat.material = new Material(Shader.Find("Particles/Additive"));
// Note the Shader name string below comes from Kerbal's packaged shaders the
// game ships with - there's many to choose from but they're not documented what
// they are. This was settled upon via trial and error:
line.material = new Material(Shader.Find("Particles/Alpha Blended"));
hat.material = new Material(Shader.Find("Particles/Alpha Blended"));

// This is how font loading would work if other fonts were available in KSP:
// Font lblFont = (Font)Resources.Load( "Arial", typeof(Font) );
Expand Down