ARTICLE AD BOX
Hopefully I can solve this before someone else reply's to this, but for anybody who sees this I've got an error while trying to take a bunch of raw pointers and replace them with smart pointers. I've pasted my snippet of code below. The error appears around Ref on the 13th line if you're wondering.
Matrix4 Actor::GetModelMatrix() { Ref<TransformComponent> transform = GetComponent<TransformComponent>(); Matrix4 modelMatrix; if (transform) { modelMatrix = transform->GetTransformMatrix(); } else { modelMatrix.loadIdentity(); } if (parent != nullptr) { /// <== LOOK AT IT! Think! modelMatrix = dynamic_cast<Ref<Actor>>(parent)->GetModelMatrix() * modelMatrix; } return modelMatrix; }
