Skip to content

Commit

Permalink
[Survey] Use part origin instead of vessel origin
Browse files Browse the repository at this point in the history
In the end, I don't think supporting unloaded stakes is worth it, so
this is probably the best solution to having the CoM not necessarily on
the part origin.

Fixes incorrect height for the stake CoM offset trick for stock
inventory.
  • Loading branch information
taniwha committed Jul 29, 2022
1 parent 76350e2 commit ca5ef10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Survey/Points.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ public Points (SurveySite site)

center = Vector3d.zero;
foreach (var stake in site) {
if (stake.stake == null) {
continue;
}
string key = ELSurveyStake.StakeUses[stake.use];
var pos = stake.vessel.GetWorldPos3D ();
var pos = stake.stake.part.transform.position;
center += pos;
count++;

Expand Down

0 comments on commit ca5ef10

Please sign in to comment.