mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2026-01-04 17:20:57 +07:00
add capsule collider
This commit is contained in:
@@ -47,9 +47,10 @@ namespace IsoTools {
|
||||
#if UNITY_EDITOR
|
||||
protected override void Reset() {
|
||||
base.Reset();
|
||||
var iso_object = GetComponent<IsoObject>();
|
||||
radius = iso_object ? IsoUtils.Vec3MinF(iso_object.size) * 0.5f : 0.0f;
|
||||
offset = iso_object ? iso_object.size * 0.5f : Vector3.zero;
|
||||
var iso_object = GetComponent<IsoObject>();
|
||||
var iso_object_size = iso_object ? iso_object.size : Vector3.zero;
|
||||
radius = IsoUtils.Vec3MinF(iso_object_size) * 0.5f;
|
||||
offset = iso_object_size * 0.5f;
|
||||
EditorUtility.SetDirty(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user