improve for unity

This commit is contained in:
JohnCorby 2023-02-03 19:22:14 -08:00
parent 174e4ea328
commit 7c89be3425

View File

@ -9,8 +9,13 @@ namespace NewHorizons.Components;
[DisallowMultipleComponent]
public class AddPhysics : MonoBehaviour
{
[Tooltip("The sector that the rigidbody will be simulated in, or none for it to always be on.")]
public Sector Sector;
[Tooltip("The mass of the physics object.\n" +
"For reference, the player has a mass of 0.001 and the probe has a mass of 0.0001.")]
public float Mass = 1f;
[Tooltip("The radius that the added sphere collider will use for physics collision.\n" +
"If there's already good colliders on the detail, you can make this 0.")]
public float Radius = 1f;
private IEnumerator Start()
@ -48,4 +53,10 @@ public class AddPhysics : MonoBehaviour
Destroy(this);
}
private void OnDrawGizmosSelected()
{
Gizmos.matrix = transform.localToWorldMatrix;
Gizmos.DrawWireSphere(Vector3.zero, Radius);
}
}