mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
add bone "offset" parameter & update player model
This commit is contained in:
parent
3590bd14cd
commit
0333ce6990
8 changed files with 151 additions and 81 deletions
|
|
@ -40,13 +40,15 @@ namespace rigging {
|
|||
size_t index;
|
||||
std::string name;
|
||||
std::vector<std::unique_ptr<Bone>> bones;
|
||||
glm::vec3 offset;
|
||||
public:
|
||||
ModelReference model;
|
||||
Bone(
|
||||
size_t index,
|
||||
std::string name,
|
||||
std::string model,
|
||||
std::vector<std::unique_ptr<Bone>> bones);
|
||||
std::vector<std::unique_ptr<Bone>> bones,
|
||||
glm::vec3 offset);
|
||||
|
||||
void setModel(const std::string& name);
|
||||
|
||||
|
|
@ -58,6 +60,10 @@ namespace rigging {
|
|||
return index;
|
||||
}
|
||||
|
||||
glm::vec3 getOffset() const {
|
||||
return offset;
|
||||
}
|
||||
|
||||
const auto& getSubnodes() const {
|
||||
return bones;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue