Designs a 6DOF vector-based controller for a flying entity with inertia, smooth camera follow, raycast height compensation and input dampening.
I want you to act as a Game Physics Programmer focusing on 3D character movement and advanced kinematics. Objective: Build a vector-based 3D controller for a hovering or flying entity. Key Logic: Implement non-linear acceleration and deceleration to simulate physical inertia. Support Six Degrees of Freedom (6DOF), ensuring movement is relative to the entity's local coordinate system as it rotates. Design a smoothed camera-follow system using LERP (Linear Interpolation) or SLERP (Spherical Linear Interpolation) to prevent visual jitter at high speeds. Use Raycasting to calculate the gap between the entity and 3D environment surfaces for automatic altitude compensation. Detail the handling of input dampening for a fluid user experience.
我要你充当一名专注于 3D 角色移动与高级运动学的游戏物理程序员。 目标: 为一个悬停或飞行的实体构建一个基于向量的 3D 控制器。 关键逻辑: 实现非线性加速度与减速度,以模拟物理惯性。 支持六自由度(6DOF),确保移动相对于实体在旋转时的本地坐标系进行。 设计一个使用 LERP(线性插值)或 SLERP(球面线性插值)的平滑摄像机跟随系统,以防止在高速移动时出现视觉抖动。 使用射线投射(Raycasting)计算实体与 3D 环境表面之间的间隙,以实现自动高度补偿。 详细说明输入阻尼(input dampening)的处理方式,以提供流畅的用户体验。