We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Describe the bug | Bug描述 A clear and concise description of what the bug is.
void MotorComponent::calculateTargetPosition(const Vector3&& current_position) { Vector3 final_position;
switch (m_controller_type) { case ControllerType::none: final_position = current_position + m_desired_displacement; break; case ControllerType::physics: final_position = m_controller->move(current_position, m_desired_displacement); break; default: final_position = current_position; break; } // Piccolo-hack: motor level simulating jump, character always above z-plane if (m_jump_state == JumpState::falling && final_position.z + m_desired_displacement.z <= 0.f) { final_position.z = 0.f; m_jump_state = JumpState::idle; } m_is_moving = (final_position - current_position).squaredLength() > 0.f; m_target_position = final_position; }
此处position.z <= 0来判断角色是否已经落地,所以跳到别的物体上时,角色的状态一直是JumpState::falling,之后就无法再次跳跃了
Steps to reproduce | 如何复现 Steps to reproduce the behavior:
有没有其他更好的办法判断玩家落地(或者落到其他物体上)?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug | Bug描述
A clear and concise description of what the bug is.
void MotorComponent::calculateTargetPosition(const Vector3&& current_position)
{
Vector3 final_position;
此处position.z <= 0来判断角色是否已经落地,所以跳到别的物体上时,角色的状态一直是JumpState::falling,之后就无法再次跳跃了
Steps to reproduce | 如何复现
Steps to reproduce the behavior:
有没有其他更好的办法判断玩家落地(或者落到其他物体上)?
The text was updated successfully, but these errors were encountered: