Character Controller Radius#
Physics 3D / Collider / Character Controller / Character Controller Radius
Description#
Compares the Radius property of Character Controller component to another value
Parameters#
| Name | Description |
|---|---|
| Character Controller | |
| Compare | |
| 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("Character Controller Radius")]
[Category("Physics 3D/Collider/Character Controller/Radius")]
[Description("Compares the Radius property of Character Controller component to another value")]
[Image(typeof(IconCapsuleSolid), ColorTheme.Type.Lime, typeof(BadgeCharacter))]
[Keywords("Physics, 3D, Kinematic")]
[Parameter("Character Controller")]
[Parameter("Compare")]
[Parameter("Value")]
[Serializable]
public class GenConditionNumber_CharacterController_CheckRadius : Condition
{
[SerializeField] private GetGameObject m_CharacterController = new GetGameObject(
new GenTypeGameObject_CharacterController()
);
[SerializeField] private CompareNumber m_Compare = new CompareNumber();
[SerializeField] private GetNumber m_Value = new GetNumber();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Radius");
return $"{this.m_CharacterController} {member} {this.m_Compare} {this.m_Value}";
}
protected override bool Run(Args args)
{
CharacterController component = this.m_CharacterController.Get<CharacterController>(args);
if (component == null) return false;
return this.m_Compare.Compare(component.radius, (float) this.m_Value.Get(args));
}
}
}