Files
sbox-public/engine/Sandbox.Engine/Scene/Components/Component.WorldTransform.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

46 lines
1.0 KiB
C#

namespace Sandbox;
public partial class Component
{
/// <summary>
/// The world transform of the game object.
/// </summary>
[ActionGraphInclude, Group( "Transform/World" )]
public Transform WorldTransform
{
get => GameObject.WorldTransform;
set => GameObject.WorldTransform = value;
}
/// <summary>
/// The world position of the game object.
/// </summary>
[ActionGraphInclude, Group( "Transform/World" )]
public Vector3 WorldPosition
{
get => WorldTransform.Position;
set => WorldTransform = WorldTransform.WithPosition( value );
}
/// <summary>
/// The world rotation of the game object.
/// </summary>
[ActionGraphInclude, Group( "Transform/World" )]
public Rotation WorldRotation
{
get => WorldTransform.Rotation;
set => WorldTransform = WorldTransform.WithRotation( value );
}
/// <summary>
/// The world scale of the game object.
/// </summary>
[ActionGraphInclude, Group( "Transform/World" )]
public Vector3 WorldScale
{
get => WorldTransform.Scale;
set => WorldTransform = WorldTransform.WithScale( value );
}
}