Skip to content

Commit

Permalink
VOXELFORMAT: THING: fixed the pivot values
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhardy committed Jan 13, 2025
1 parent 6969729 commit 85666b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/voxelformat/private/rooms/ThingFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bool ThingFormat::addMediaImage(const io::ArchivePtr &archive, const NodeSpec &n
if (mediaPlane) {
scenegraph::SceneGraphNode mediaNode(scenegraph::SceneGraphNodeType::Model);
mediaNode.setVolume(mediaPlane, true);
mediaNode.setPivot(glm::vec3{0.5f});
mediaNode.setPivot(glm::vec3{0.5f, 0.0f, 0.5f});
mediaNode.setPalette(palette);
mediaNode.setProperty("mediaName", nodeSpec.mediaName);
mediaNode.setColor(nodeSpec.color);
Expand Down Expand Up @@ -117,7 +117,7 @@ bool ThingFormat::loadNode(const io::ArchivePtr &archive, const NodeSpec &nodeSp
scenegraph::SceneGraphTransform transform =
toTransform(node.region(), nodeSpec.localPos, nodeSpec.localRot, nodeSpec.localSize, nodeSpec.scale);
node.setTransform(keyFrameIdx, transform);
node.setPivot(glm::vec3{0.5f});
node.setPivot(glm::vec3{0.5f, 0.0f, 0.5f});
node.setColor(nodeSpec.color);
node.setName(nodeSpec.name);
if (!nodeSpec.thingLibraryId.empty()) {
Expand Down

0 comments on commit 85666b7

Please sign in to comment.