editor: fixed snap to surface transform
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ private:
|
||||
float angle = 0;
|
||||
float angle_start = 0;
|
||||
bool has_selected_transform = false;
|
||||
wi::vector<uint32_t> temp_filters;
|
||||
wi::vector<uint64_t> temp_filters;
|
||||
public:
|
||||
|
||||
void Update(const wi::scene::CameraComponent& camera, const XMFLOAT4& currentMouse, const wi::Canvas& canvas);
|
||||
|
||||
Reference in New Issue
Block a user