apply _buoyancy and _splashEffects from probe

This commit is contained in:
JohnCorby 2023-04-24 17:13:28 -07:00
parent cbd87292e5
commit 0398a869f3

View File

@ -48,7 +48,9 @@ public class AddPhysics : MonoBehaviour
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>();