mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Disable collision checks for complex shapes
This commit is contained in:
parent
4e9ec84427
commit
c9b1f91c7b
@ -90,6 +90,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
cylinderShape._radius = info.radius;
|
cylinderShape._radius = info.radius;
|
||||||
cylinderShape._height = info.height;
|
cylinderShape._height = info.height;
|
||||||
cylinderShape._center = info.offset ?? Vector3.zero;
|
cylinderShape._center = info.offset ?? Vector3.zero;
|
||||||
|
cylinderShape._pointChecksOnly = true;
|
||||||
return cylinderShape;
|
return cylinderShape;
|
||||||
case ShapeType.Cone:
|
case ShapeType.Cone:
|
||||||
var coneShape = go.AddComponent<ConeShape>();
|
var coneShape = go.AddComponent<ConeShape>();
|
||||||
@ -98,6 +99,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
coneShape._direction = (int)info.direction;
|
coneShape._direction = (int)info.direction;
|
||||||
coneShape._height = info.height;
|
coneShape._height = info.height;
|
||||||
coneShape._center = info.offset ?? Vector3.zero;
|
coneShape._center = info.offset ?? Vector3.zero;
|
||||||
|
coneShape._pointChecksOnly = true;
|
||||||
return coneShape;
|
return coneShape;
|
||||||
case ShapeType.Hemisphere:
|
case ShapeType.Hemisphere:
|
||||||
var hemisphereShape = go.AddComponent<HemisphereShape>();
|
var hemisphereShape = go.AddComponent<HemisphereShape>();
|
||||||
@ -105,6 +107,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
hemisphereShape._direction = (int)info.direction;
|
hemisphereShape._direction = (int)info.direction;
|
||||||
hemisphereShape._cap = info.cap;
|
hemisphereShape._cap = info.cap;
|
||||||
hemisphereShape._center = info.offset ?? Vector3.zero;
|
hemisphereShape._center = info.offset ?? Vector3.zero;
|
||||||
|
hemisphereShape._pointChecksOnly = true;
|
||||||
return hemisphereShape;
|
return hemisphereShape;
|
||||||
case ShapeType.Hemicapsule:
|
case ShapeType.Hemicapsule:
|
||||||
var hemicapsuleShape = go.AddComponent<HemicapsuleShape>();
|
var hemicapsuleShape = go.AddComponent<HemicapsuleShape>();
|
||||||
@ -113,6 +116,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
hemicapsuleShape._height = info.height;
|
hemicapsuleShape._height = info.height;
|
||||||
hemicapsuleShape._cap = info.cap;
|
hemicapsuleShape._cap = info.cap;
|
||||||
hemicapsuleShape._center = info.offset ?? Vector3.zero;
|
hemicapsuleShape._center = info.offset ?? Vector3.zero;
|
||||||
|
hemicapsuleShape._pointChecksOnly = true;
|
||||||
return hemicapsuleShape;
|
return hemicapsuleShape;
|
||||||
case ShapeType.Ring:
|
case ShapeType.Ring:
|
||||||
var ringShape = go.AddComponent<RingShape>();
|
var ringShape = go.AddComponent<RingShape>();
|
||||||
@ -120,6 +124,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
ringShape.outerRadius = info.outerRadius;
|
ringShape.outerRadius = info.outerRadius;
|
||||||
ringShape.height = info.height;
|
ringShape.height = info.height;
|
||||||
ringShape.center = info.offset ?? Vector3.zero;
|
ringShape.center = info.offset ?? Vector3.zero;
|
||||||
|
ringShape._pointChecksOnly = true;
|
||||||
return ringShape;
|
return ringShape;
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException(nameof(info.type), info.type, $"Unsupported shape type");
|
throw new ArgumentOutOfRangeException(nameof(info.type), info.type, $"Unsupported shape type");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user