Transform Transform Point#
Transform / Transformations / Transform Transform Point Position
Description#
Transforms the position from local space to world space
Parameters#
| Name | Description |
|---|---|
| Transform | |
| Position | |
| 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("Transform Transform Point")]
[Category("Transform/Transformations/Transform Point", "Position")]
[Description("Transforms the position from local space to world space")]
[Image(typeof(IconCubeOutline), ColorTheme.Type.Lime)]
[Keywords("Transform")]
[Parameter("Transform")]
[Parameter("Position")]
[Parameter("Value")]
[Serializable]
public class GenConditionVector3_Transform_CheckTransformPoint_1_Vector3Position : Condition
{
[SerializeField] private GetGameObject m_Transform = new GetGameObject(
new GenTypeGameObject_Transform()
);
[SerializeField] private GetVector3 m_Value = new GetVector3();
[SerializeField] private GetVector3 m_Position = new GetVector3();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Transform Point");
string parameters = $"({this.m_Position})";
return $"{this.m_Transform} {method} = {this.m_Value}";
}
protected override bool Run(Args args)
{
Transform component = this.m_Transform.Get<Transform>(args);
if (component == null) return false;
Vector3 value = component.TransformPoint(
(Vector3) this.m_Position.Get(args)
);
return value == (Vector3) this.m_Value.Get(args);
}
}
}