Skip to content

Wrong function conversion from Euler to Quaternion #1629

Closed

Description

@fire

Godot version

Not in godot master.

godot-cpp version

a98d41f

System information

Macos, m2 mac mini

Issue description

Quaternion::Quaternion(const Vector3 &p_euler); https://github.com/godotengine/godot-cpp/blob/master/src/variant/quaternion.cpp#L335

Does not properly implement all 6 conversion or let the developer choose the rotation order. https://github.com/godotengine/godot/blob/master/core/math/basis.cpp#L457

This function was purposely left out of Quaternion because the math for this would be duplicated. I would recommend converting from basis as a wrapper.

Steps to reproduce

Code review.

Minimal reproduction project

The reproduction steps are by code review.

Activity

  1. dsnopek commented on Oct 28, 2024

    @dsnopek
    Collaborator

    If I'm understanding correctly, you're saying that godot-cpp has this Quaternion::Quaternion(const Vector3 &p_euler) constructor, which Godot itself purposefully doesn't have?

    We want to have compatibility with Godot, so assuming I'm understanding correctly, I think it makes sense to remove that construct from godot-cpp.

    I don't know if the Quaternion class in godot-cpp has any other differences from the one in Godot, but if so, it would be good to rectify that as well.

  2. added
    bug
    on Oct 28, 2024
  3. added this to the 4.x milestone on Oct 28, 2024
  4. fire commented on Oct 28, 2024

    @fire
    MemberAuthor
  5. fire commented on Oct 28, 2024

    @fire
    MemberAuthor

    I think it makes sense to remove that construct from godot-cpp.

    I agree.

  6. dsnopek commented on Oct 28, 2024

    @dsnopek
    Collaborator

    I just posted PR #1630 which should fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions