Skip to content

Commit ebb756e

Browse files
committed
1.1.3.2
Fix BoxColliderZone.Position.
1 parent b5242cb commit ebb756e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

SZones.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFrameworks>net472</TargetFrameworks>
66
<AssemblyName>SZones</AssemblyName>
77
<RootNamespace>SZones</RootNamespace>
8-
<Version>1.1.3.1</Version>
8+
<Version>1.1.3.2</Version>
99
<NoWarn>$(NoWarn);CS0436</NoWarn>
1010
<RunPostBuildEvent>Always</RunPostBuildEvent>
1111
<Nullable>annotations</Nullable>

Zones/BoxColliderZone.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ public abstract class BoxColliderZone<TController> : Zone<TController>
55
{
66
public override SVector3 Position
77
{
8-
get => Controller?.Collider.center ?? base.Position;
8+
get
9+
{
10+
if(Controller is null) return base.Position;
11+
var center = Controller.Collider.center;
12+
center.y = Controller.Collider.bounds.min.y;
13+
return center;
14+
}
915
set
1016
{
1117
base.Position = value;

0 commit comments

Comments
 (0)