mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
improve for unity
This commit is contained in:
parent
174e4ea328
commit
7c89be3425
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user