Skip to content

Commit

Permalink
set transform component of selected object dirty
Browse files Browse the repository at this point in the history
Set transform component of selected object dirty in Editor Mode
  • Loading branch information
OlorinMedas authored and Ol6rin committed Jun 7, 2022
1 parent 7cbcde9 commit 4047716
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion engine/source/editor/source/editor_scene_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ namespace Pilot

void EditorSceneManager::tick(float delta_time)
{
// todo: editor scene tick
std::shared_ptr<GObject> selected_gobject = getSelectedGObject().lock();
if (selected_gobject)
{
TransformComponent* transform_component = selected_gobject->tryGetComponent(TransformComponent);
if (transform_component)
{
transform_component->setDirtyFlag(true);
}
}
}

float intersectPlaneRay(glm::vec3 normal, float d, glm::vec3 origin, glm::vec3 dir)
Expand Down

0 comments on commit 4047716

Please sign in to comment.