Skip to content

Commit

Permalink
Fix shape algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
apua committed Jan 7, 2024
1 parent 90305f3 commit a8b6138
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Assets/Scenes/SampleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ MonoBehaviour:
DegreePerSecond: 36
RotationAxis: {x: 60, y: 80, z: 0}
Amount: 128
Shape: 1
Shape: 0
--- !u!4 &77179604
Transform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -450,7 +450,7 @@ Transform:
m_GameObject: {fileID: 963194225}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -20}
m_LocalPosition: {x: 0, y: 0, z: -25}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down
6 changes: 3 additions & 3 deletions Assets/Universe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@ public static Vector3 Tetrahedron()
};
var p = Random.value;
return new(
Radius * 2/3 * (v.X + p * (w.X - v.X)),
Radius * 2/3 * (v.Y + p * (w.Y - v.Y)),
Radius * 2/3 * (v.Z + p * (w.Z - v.Z))
Radius / 2 * (v.X + p * (w.X - v.X)),
Radius / 2 * (v.Y + p * (w.Y - v.Y)),
Radius / 2 * (v.Z + p * (w.Z - v.Z))
);
}

Expand Down

0 comments on commit a8b6138

Please sign in to comment.