refactor(physics): rename isSensor to isTrigger (Unity/UE terminology)

UE calls it Trigger (Overlap Events / Trigger preset) and Unity's UI
says "Is Trigger"; "sensor" is the physics-backend term (Jolt sensor,
Box2D sensor). Rename the component/record flag and the Inspector
label. Scene files now persist "IsTrigger" with backward-compatible
read of the old "IsSensor" key.
This commit is contained in:
2026-10-03 18:53:38 +08:00
parent b6d0868e15
commit 29c413579d
5 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -406,7 +406,7 @@ void InspectorPanel::Draw(const EditorContext& ctx, entt::entity selected)
ImGui::SliderFloat("gravityScale", &rb->gravityScale, -1.0f, 5.0f);
ImGui::SliderFloat("friction", &rb->friction, 0.0f, 2.0f);
ImGui::SliderFloat("restitution", &rb->restitution, 0.0f, 1.0f);
ImGui::Checkbox("isSensor", &rb->isSensor);
ImGui::Checkbox("isTrigger", &rb->isTrigger);
if (rb->bodyValid &&
rb->type == Engine::ECS::RigidBodyComponent::BodyType::Dynamic)
{