Try really hard to not have the gravity well for a focal point affect you

This commit is contained in:
xen-42 2025-02-04 19:03:25 -05:00
parent 458c202fa4
commit 35c0b934c7

View File

@ -27,15 +27,25 @@ namespace NewHorizons.Builder.General
gravityGO.layer = Layer.BasicEffectVolume;
gravityGO.SetActive(false);
var SC = gravityGO.AddComponent<SphereCollider>();
SC.isTrigger = true;
SC.radius = gravityRadius;
var sphereCollider = gravityGO.AddComponent<SphereCollider>();
sphereCollider.isTrigger = true;
sphereCollider.radius = gravityRadius;
var owCollider = gravityGO.AddComponent<OWCollider>();
owCollider.SetLODActivationMask(DynamicOccupant.Player);
var owTriggerVolume = gravityGO.AddComponent<OWTriggerVolume>();
// If it's a focal point dont add collision stuff
if (config.FocalPoint != null)
{
owCollider.enabled = false;
owTriggerVolume.enabled = false;
sphereCollider.radius = 0;
sphereCollider.enabled = false;
sphereCollider.isTrigger = false;
}
// copied from th and qm
var gravityVolume = gravityGO.AddComponent<GravityVolume>();
gravityVolume._cutoffAcceleration = 0f;