Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. How can I create a QSkeleton manually with C++ and apply it to a mesh so that I can animate using C++?
Forum Updated to NodeBB v4.3 + New Features

How can I create a QSkeleton manually with C++ and apply it to a mesh so that I can animate using C++?

Scheduled Pinned Locked Moved Unsolved Game Development
1 Posts 1 Posters 479 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheQuaternion
    wrote on last edited by
    #1

    Basically, I'm able to load a mesh via SceneLoader, but have no access to the joints. So I thought I could use the QSkeleton class and add a skeleton to my entity, but it hasn't worked.

    I don't know how to create a skeleton and apply it to my mesh in Qt so I can animate it using C++.

    For example, if I add one joint to a skeleton and apply it to the same Entity as the Mesh nothing happens when I update the transform of the joint and reapply the skeleton in the Update loop I have.

    Qt3DCore::QSkeleton* skeleton = new Qt3DCore::QSkeleton();
    Qt3DCore::QJoint* joint = new Qt3DCore::QJoint();
    joint->setTranslation(entityTransform->translation());
    skeleton->setRootJoint(joint);
    Qt3DCore::QArmature* a = new Qt3DCore::QArmature();
    a->setSkeleton(skeleton);
    entity->addComponent(a);
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved