chore(scripts): rename script API to GetComponent/TryGetComponent; misc
Clearer accessor naming on ScriptBehavior (Get -> GetComponent, TryGet -> TryGetComponent), WASDMove follows. Teleport marked const (JPH Ref does not propagate constness). Spinner: auto-rotation disabled for the moment, registration switched from the registration macro to an explicit lambda to verify the mechanism.
This commit is contained in:
@@ -49,7 +49,7 @@ namespace {
|
||||
}
|
||||
const glm::vec3 vel = move * m_Speed;
|
||||
|
||||
if (auto* rb = TryGet<Engine::ECS::RigidBodyComponent>();
|
||||
if (auto* rb = TryGetComponent<Engine::ECS::RigidBodyComponent>();
|
||||
rb != nullptr && rb->bodyValid &&
|
||||
rb->type == Engine::ECS::RigidBodyComponent::BodyType::Dynamic) {
|
||||
// 物理驱动:只覆写水平速度,Y 保留物理积分离散结果
|
||||
|
||||
Reference in New Issue
Block a user