Skip to content

Commit 5dd390f

Browse files
committed
Fix
1 parent 59c556e commit 5dd390f

File tree

6 files changed

+16
-9
lines changed

6 files changed

+16
-9
lines changed

CustomFlatRide/CustomFlatRideLoader.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,7 @@ public void BasicFlatRideSettings(FlatRide FlatRideScript, string DisplayName, f
116116
FlatRideScript.setDisplayName(DisplayName);
117117
FlatRideScript.xSize = x;
118118
FlatRideScript.zSize = Z;
119-
BoundingBox bb = FlatRideScript.gameObject.AddComponent<BoundingBox>();
120-
bb.layers = BoundingVolume.Layers.Buildvolume;
121-
Bounds B = new Bounds();
122-
B.center = new Vector3(0,1,0);
123-
B.size = new Vector3(x, 2, Z);
124-
bb.setBounds(B);
119+
125120

126121

127122
}
@@ -178,5 +173,14 @@ public Color ConvertColor(int r, int g, int b)
178173
{
179174
return new Color(r / 255f, g / 255f, b / 255f);
180175
}
176+
public void AddBoundingBox(GameObject asset , float x, float z)
177+
{
178+
BoundingBox bb = asset.AddComponent<BoundingBox>();
179+
bb.layers = BoundingVolume.Layers.Buildvolume;
180+
Bounds B = new Bounds();
181+
B.center = new Vector3(0, 1, 0);
182+
B.size = new Vector3(x - .01f, 2, z - .01f);
183+
bb.setBounds(B);
184+
}
181185
}
182186

CustomFlatRide/FlatRideLoader.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public void LoadKMG()
5858
};
5959
base.SetWaypoints(asset, connections);
6060
asset.transform.position = new Vector3(0,999,0);
61+
base.AddBoundingBox(asset, 6, 6);
6162
}
6263
public void LoadFlatRides()
6364
{

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
# KMG Experience Flat-Ride
2-
Mod with KMG Experience as custom Flat-Rides
1+
# CustomFlat-Rides
2+
Mod more Flat-Rides
3+
4+
See https://parkitectnexus.com/modding-wiki for documentation

bin/build-160110190421540.dll

12 KB
Binary file not shown.

bin/build.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bin/build-160110180608765.dll
1+
bin/build-160110190421540.dll

0 commit comments

Comments
 (0)