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:
@@ -232,8 +232,9 @@ namespace Engine::ECS {
|
||||
f32 friction = 0.5f;
|
||||
f32 restitution = 0.2f;
|
||||
|
||||
// 传感器(Unity isTrigger 语义):只产生 Added/Removed 事件,无碰撞解算
|
||||
bool isSensor = false;
|
||||
// 触发器(Unity isTrigger / UE Overlap Events 语义):只产生
|
||||
// Added/Removed 事件,无碰撞解算;底层 Jolt sensor
|
||||
bool isTrigger = false;
|
||||
|
||||
// 运行时(PhysicsWorld 维护,勿手改)
|
||||
u32 bodyId = 0; // JPH::BodyID 裸位
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace Engine {
|
||||
f32 halfHeight = 0.0f; // Capsule/Cylinder 圆柱段半高
|
||||
std::vector<ECS::RigidBodyComponent::CompoundChild> compound; // 子形状快照
|
||||
f32 mass = 0.0f;
|
||||
bool isSensor = false; // 传感器标记(变更 → 重建 body)
|
||||
bool isTrigger = false; // 触发器标记(变更 → 重建 body)
|
||||
glm::vec3 lastPos{0.0f}; // 静态/运动体编辑器拖动检测
|
||||
glm::quat lastRot{1.0f, 0.0f, 0.0f, 0.0f}; // 同上(quat 直比,无欧拉往返)
|
||||
// 加速度箭头用:上一步速度(定步长差分)与平滑后的加速度
|
||||
|
||||
Reference in New Issue
Block a user