using BepuPhysics.Collidables; using UnityEngine; namespace Plugins.JNGame.BepuPhysics.Components { public class BPhysicsSphere : BPhysicsBase { void Awake() { if (this.Physics == null) return; Debug.Log("BPhysicsSphere"); this.Physics.Shapes.Add(this); var sphereShape = new Sphere(transform.localScale.x / 2); sphereShape.ComputeInertia(0.5f, out var sphereInertia); this.AddDynamic(sphereShape,sphereInertia); } } }