diff --git a/Editor/Translator.cpp b/Editor/Translator.cpp index 56740de66..a7910d480 100644 --- a/Editor/Translator.cpp +++ b/Editor/Translator.cpp @@ -478,8 +478,9 @@ void Translator::Update(const CameraComponent& camera, const XMFLOAT4& currentMo ObjectComponent* object = scene.objects.GetComponent(x.entity); if (object == nullptr) continue; - temp_filters.push_back(object->filterMask); + temp_filters.push_back(uint64_t(object->filterMask) | (uint64_t(object->filterMaskDynamic) << 32ull)); object->filterMask = 0; + object->filterMaskDynamic = 0; } Ray ray = wi::renderer::GetPickRay((long)currentMouse.x, (long)currentMouse.y, canvas, camera); wi::scene::Scene::RayIntersectionResult result = scene.Intersects(ray, wi::enums::FILTER_OBJECT_ALL); @@ -490,7 +491,9 @@ void Translator::Update(const CameraComponent& camera, const XMFLOAT4& currentMo ObjectComponent* object = scene.objects.GetComponent(x.entity); if (object == nullptr) continue; - object->filterMask = temp_filters[ind++]; + uint64_t tmp = temp_filters[ind++]; + object->filterMask = uint32_t(tmp); + object->filterMaskDynamic = uint32_t(tmp >> 32ull); } } } diff --git a/Editor/Translator.h b/Editor/Translator.h index 63339fe7f..0a369b724 100644 --- a/Editor/Translator.h +++ b/Editor/Translator.h @@ -11,7 +11,7 @@ private: float angle = 0; float angle_start = 0; bool has_selected_transform = false; - wi::vector temp_filters; + wi::vector temp_filters; public: void Update(const wi::scene::CameraComponent& camera, const XMFLOAT4& currentMouse, const wi::Canvas& canvas);