mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Gizmo improvements
This commit is contained in:
@@ -27,7 +27,7 @@ namespace GlitchyEngine.World
|
||||
|
||||
public ChildEnumerator EnumerateChildren => .(this);
|
||||
|
||||
public bool IsValid => _entity.IsValid;
|
||||
public bool IsValid => _entity.IsValid && _scene != null;
|
||||
|
||||
public Entity? Parent
|
||||
{
|
||||
|
||||
@@ -12,6 +12,20 @@ namespace GlitchyEngine.World
|
||||
internal EcsWorld _ecsWorld = new .() ~ delete _;
|
||||
|
||||
private Dictionary<Type, function void(Entity entity, Type componentType, void* component)> _onComponentAddedHandlers = new .() ~ delete _;
|
||||
|
||||
public Entity ActiveCamera => {
|
||||
Entity cameraEntity = .();
|
||||
|
||||
for (var (entity, camera) in _ecsWorld.Enumerate<CameraComponent>())
|
||||
{
|
||||
if (camera.Primary && camera.RenderTarget != null)
|
||||
{
|
||||
cameraEntity = .(entity, this);
|
||||
}
|
||||
}
|
||||
|
||||
cameraEntity
|
||||
};
|
||||
|
||||
public this()
|
||||
{
|
||||
|
||||
@@ -43,7 +43,10 @@ namespace GlitchyEngine.World
|
||||
|
||||
_localTransform = value;
|
||||
|
||||
Matrix.Decompose(_localTransform, out _position, out _rotation, out _scale);
|
||||
Matrix.Decompose(_localTransform, out _position, let rotation, out _scale);
|
||||
|
||||
Rotation = rotation;
|
||||
|
||||
IsDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user