mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Added Setter for LocalTransform
This commit is contained in:
@@ -9,7 +9,7 @@ namespace GlitchyEngine.World
|
|||||||
Vector3 _scale = .One;
|
Vector3 _scale = .One;
|
||||||
|
|
||||||
Matrix _localTransform = .Identity;
|
Matrix _localTransform = .Identity;
|
||||||
public bool IsDirty = false;;
|
public bool IsDirty = false;
|
||||||
|
|
||||||
public Matrix WorldTransform = .Identity;
|
public Matrix WorldTransform = .Identity;
|
||||||
|
|
||||||
@@ -19,7 +19,16 @@ namespace GlitchyEngine.World
|
|||||||
public Matrix LocalTransform
|
public Matrix LocalTransform
|
||||||
{
|
{
|
||||||
get => _localTransform;
|
get => _localTransform;
|
||||||
set mut => _localTransform = value;
|
set mut
|
||||||
|
{
|
||||||
|
if(_localTransform == value)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_localTransform = value;
|
||||||
|
|
||||||
|
Matrix.Decompose(_localTransform, out _position, out _rotation, out _scale);
|
||||||
|
IsDirty = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 Position
|
public Vector3 Position
|
||||||
|
|||||||
Reference in New Issue
Block a user