small fises in deleting Transformables WIP

This commit is contained in:
2026-01-20 23:11:49 +01:00
parent 37958449a2
commit 11e8d343af
5 changed files with 25 additions and 3 deletions

View File

@@ -34,6 +34,10 @@ namespace TSE
objectEntries[id] = this;
}
Transformable::~Transformable()
{
}
Vector3 Transformable::forward() const
{
return Vector3::Normalize(GetGlobalMatrix() * Vector3::forward - GetGlobalMatrix() * Vector3::zero);
@@ -368,12 +372,15 @@ namespace TSE
if(!onlyThis)
for(auto child : t->children)
{
HardDelete(child);
HardDelete(child, onlyThis);
}
//deleting atteched scripts
for (auto& [_, script] : t->components)
{
delete script;
}
t->components.clear();
//deleting self
Delete(t);

View File

@@ -36,7 +36,7 @@ namespace TSE
Transformable(uuids::uuid id);
Transformable(const string& name);
Transformable(const string& name, uuids::uuid id);
~Transformable() = default;
~Transformable();
Vector3 forward() const;
Vector3 right() const;