Skip to content

Commit

Permalink
get rid of Camera.main reference
Browse files Browse the repository at this point in the history
  • Loading branch information
rms80 committed Jun 20, 2018
1 parent 314631d commit adf7dfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion widgets/AxisTranslationWidget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override bool BeginCapture(ITransformable target, Ray3f worldRay, UIRayHi
translateFrameW.Origin, translateAxisW, vWorldHitPos);

// construct plane we will ray-intersect with in UpdateCapture()
Vector3f makeUp = Vector3f.Cross(Camera.main.transform.forward, translateAxisW).Normalized;
Vector3f makeUp = Vector3f.Cross(FPlatform.MainCamera.Forward(), translateAxisW).Normalized;
Vector3f vPlaneNormal = Vector3f.Cross(makeUp, translateAxisW).Normalized;
raycastFrame = new Frame3f(vWorldHitPos, vPlaneNormal);

Expand Down

0 comments on commit adf7dfb

Please sign in to comment.