mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
make tornadoes work with physics object (#582)
<!-- A new module or something else important --> ## Major features - <!-- A new parameter added to a module, or API feature --> ## Minor features - <!-- Some improvement that requires no action on the part of add-on creators i.e., improved star graphics --> ## Improvements - <!-- Be sure to reference the existing issue if it exists --> ## Bug fixes - physics details are now affected by tornadoes fix #580. i give up on tornadoes
This commit is contained in:
commit
a50feb6081
@ -44,8 +44,13 @@ public class AddPhysics : MonoBehaviour
|
||||
bodyGo.tag = "DynamicPropDetector";
|
||||
// this collider is not included in groups. oh well
|
||||
bodyGo.AddComponent<SphereCollider>().radius = Radius;
|
||||
var shape = bodyGo.AddComponent<SphereShape>();
|
||||
shape._collisionMode = Shape.CollisionMode.Detector;
|
||||
shape.radius = Radius;
|
||||
bodyGo.AddComponent<DynamicForceDetector>();
|
||||
bodyGo.AddComponent<DynamicFluidDetector>();
|
||||
var fluidDetector = bodyGo.AddComponent<DynamicFluidDetector>();
|
||||
fluidDetector._buoyancy = Locator.GetProbe().GetOWRigidbody()._attachedFluidDetector._buoyancy;
|
||||
fluidDetector._splashEffects = Locator.GetProbe().GetOWRigidbody()._attachedFluidDetector._splashEffects;
|
||||
|
||||
var impactSensor = bodyGo.AddComponent<ImpactSensor>();
|
||||
var audioSource = bodyGo.AddComponent<AudioSource>();
|
||||
@ -82,4 +87,4 @@ public class AddPhysics : MonoBehaviour
|
||||
{
|
||||
Gizmos.DrawWireSphere(transform.position, Radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user