Skip to content

How to use 'rotate' with quaternion #217

Description

@shorttrack789
        m_model = glm.mat4()
        # translate
        m_model = glm.translate(m_model, self.transf.position.getvec3())
        # rotate
        m_model = glm.rotate(m_model, self.transf.rotation.z, glm.vec3(0, 0, 1))
        m_model = glm.rotate(m_model, self.transf.rotation.y, glm.vec3(0, 1, 0))
        m_model = glm.rotate(m_model, self.transf.rotation.x, glm.vec3(1, 0, 0))
        # scale
        m_model = glm.scale(m_model, (self.transf.scale.x, self.transf.scale.y, self.transf.scale.z))
        return m_model

How to use rotate method with quaternion?

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions