mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
finalize
This commit is contained in:
parent
cf2f45b6a7
commit
e45a4d1c3c
@ -232,7 +232,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
if (!detail.keepLoaded) GroupsBuilder.Make(prop, sector);
|
if (!detail.keepLoaded) GroupsBuilder.Make(prop, sector);
|
||||||
prop.SetActive(true);
|
prop.SetActive(true);
|
||||||
|
|
||||||
if (detail.hasPhysics || true)
|
if (detail.hasPhysics)
|
||||||
{
|
{
|
||||||
var addPhysics = prop.AddComponent<AddPhysics>();
|
var addPhysics = prop.AddComponent<AddPhysics>();
|
||||||
addPhysics.Sector = sector;
|
addPhysics.Sector = sector;
|
||||||
@ -428,14 +428,15 @@ namespace NewHorizons.Builder.Props
|
|||||||
if (!Sector)
|
if (!Sector)
|
||||||
Logger.LogError($"Prop {name} has physics but no sector! Will fall through things when surrounding area is unloaded");
|
Logger.LogError($"Prop {name} has physics but no sector! Will fall through things when surrounding area is unloaded");
|
||||||
|
|
||||||
yield return new WaitForSeconds(3f);
|
yield return new WaitForSeconds(.1f);
|
||||||
|
|
||||||
var parentBody = GetComponentInParent<OWRigidbody>();
|
var parentBody = GetComponentInParent<OWRigidbody>();
|
||||||
|
|
||||||
// just disable all non triggers
|
// hack: make all mesh colliders convex
|
||||||
foreach (var collider in GetComponentsInChildren<Collider>(true))
|
// triggers are already convex but whatever
|
||||||
if (!collider.isTrigger)
|
// prints errors for non readable meshes but whatever
|
||||||
collider.enabled = false;
|
foreach (var meshCollider in GetComponentsInChildren<MeshCollider>(true))
|
||||||
|
meshCollider.convex = true;
|
||||||
|
|
||||||
var bodyGo = new GameObject($"{name}_Body");
|
var bodyGo = new GameObject($"{name}_Body");
|
||||||
bodyGo.SetActive(false);
|
bodyGo.SetActive(false);
|
||||||
|
|||||||
1
NewHorizons/External/Modules/PropModule.cs
vendored
1
NewHorizons/External/Modules/PropModule.cs
vendored
@ -232,6 +232,7 @@ namespace NewHorizons.External.Modules
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Should this object dynamically move around?
|
/// Should this object dynamically move around?
|
||||||
|
/// This tries to make all mesh colliders convex, as well as adding a sphere collider in case the detail has no others.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool hasPhysics;
|
public bool hasPhysics;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user