Check Sphere#
Physics / Physics / Check Sphere Position, Radius, LayerMask, QueryTriggerInteraction
Description#
Compares the Check Sphere static method of Physics class to another value
Parameters#
| Name | Description |
|---|---|
| Position | |
| Radius | |
| Layer Mask | |
| Query Trigger Interaction |
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("Check Sphere")]
[Category("Physics/Physics/Check Sphere", "Position, Radius, LayerMask, QueryTriggerInteraction")]
[Description("Compares the Check Sphere static method of Physics class to another value")]
[Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
[Parameter("Position")]
[Parameter("Radius")]
[Parameter("Layer Mask")]
[Parameter("Query Trigger Interaction")]
[Serializable]
public class GenConditionBool_Physics_CheckCheckSphere_4_Vector3Position_FloatRadius_IntLayerMask_QueryTriggerInteractionQueryTriggerInteraction : Condition
{
[SerializeField] private GetVector3 m_Position = new GetVector3();
[SerializeField] private GetNumber m_Radius = new GetNumber();
[SerializeField] private GetInteger m_LayerMask = new GetInteger();
[SerializeField] private QueryTriggerInteraction m_QueryTriggerInteraction = default;
protected override string GetTitle(GameObject source)
{
string className = TextUtils.ThemeAsKeyword("Physics");
string method = TextUtils.ThemeAsKeyword("Check Sphere");
return $"{className} {method} ({this.m_Position}, {this.m_Radius}, {this.m_LayerMask}, {this.m_QueryTriggerInteraction})";
}
protected override bool Run(Args args)
{
bool value = Physics.CheckSphere(
(Vector3) this.m_Position.Get(args),
(float) this.m_Radius.Get(args),
(int) this.m_LayerMask.Get(args),
this.m_QueryTriggerInteraction
);
return value;
}
}
}