Capsule Collider Center#
Physics 3D / Collider / Capsule Collider / Capsule Collider Center
Description#
Compares the Center property of Capsule Collider component to another value
Parameters#
| Name | Description |
|---|---|
| Capsule Collider | |
| Value |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("Capsule Collider Center")]
[Category("Physics 3D/Collider/Capsule Collider/Center")]
[Description("Compares the Center property of Capsule Collider component to another value")]
[Image(typeof(IconCapsuleSolid), ColorTheme.Type.Lime)]
[Keywords("Physics, 3D")]
[Parameter("Capsule Collider")]
[Parameter("Value")]
[Serializable]
public class GenConditionVector3_CapsuleCollider_CheckCenter : Condition
{
[SerializeField] private GetGameObject m_CapsuleCollider = new GetGameObject(
new GenTypeGameObject_CapsuleCollider()
);
[SerializeField] private GetVector3 m_Value = new GetVector3();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Center");
return $"{this.m_CapsuleCollider} {member} = {this.m_Value}";
}
protected override bool Run(Args args)
{
CapsuleCollider component = this.m_CapsuleCollider.Get<CapsuleCollider>(args);
if (component == null) return false;
return component.center == (Vector3) this.m_Value.Get(args);
}
}
}