mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 12:05:23 +01:00
Change volumes back to shapes by default not colliders (broke mod puzzles with volumes on held items)
This commit is contained in:
parent
e38884037b
commit
6ee8f16cc4
@ -42,17 +42,28 @@ namespace NewHorizons.Builder.Props
|
||||
{
|
||||
// Explicitly add either a shape or collider if specified
|
||||
if (info.useShape.Value)
|
||||
{
|
||||
return AddShape(go, info);
|
||||
}
|
||||
else
|
||||
{
|
||||
return AddCollider(go, info);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Prefer colliders over shapes if no preference is specified
|
||||
if (info.type is ShapeType.Sphere or ShapeType.Box or ShapeType.Capsule)
|
||||
// Prefer shapes over colliders if no preference is specified and not using collision
|
||||
// This is required for backwards compat (previously it defaulted to shapes)
|
||||
// A common-ish puzzle is to put an insulating volume on a held item. Held items disabled all colliders when held, but don't disable shapes.
|
||||
// Changing the default from shapes to colliders broke these puzzles
|
||||
if (info.hasCollision)
|
||||
{
|
||||
return AddCollider(go, info);
|
||||
}
|
||||
else
|
||||
{
|
||||
return AddShape(go, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -64,7 +64,8 @@ namespace NewHorizons.External.Modules.Props
|
||||
public bool hasCollision = false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to explicitly use a shape instead of a collider. Shapes do not support collision and are less performant, but support a wider set of shapes and are required by some components. Omit this unless you explicitly want to use a sphere, box, or capsule shape instead of a collider.
|
||||
/// Whether to explicitly use a shape instead of a collider. Shapes do not support collision and are less performant, but support a wider set of shapes and are required by some components.
|
||||
/// Defaults to using a shape, unless hasCollision is true where it defaults to using a collider.
|
||||
/// </summary>
|
||||
public bool? useShape;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user