Skip to content

Commit

Permalink
Merge pull request #82 from tilak-io/fix/rotation_sequence_origin
Browse files Browse the repository at this point in the history
Rotation sequence (ZYX) + Frame origin
  • Loading branch information
HmZyy authored Jan 19, 2024
2 parents b858e8a + 1f942dc commit b6c3827
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/controllers/Entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default class Entity {

addEuler(props) {
this.rotations.push(
new THREE.Euler(props.roll, props.pitch, props.yaw, "XYZ")
new THREE.Euler(props.roll, props.pitch, props.yaw, "ZYX")
);
}

Expand Down Expand Up @@ -157,9 +157,10 @@ export default class Entity {
setReference(e) {
// we set the first position as the reference
if (e.useXYZ) {
this.ref_x = e.props[0].x;
this.ref_y = e.props[0].y;
this.ref_z = e.props[0].z;
this.ref_x = 0;
this.ref_y = 0;
this.ref_z = 0;

} else {
this.ref_x = 0;
this.ref_y = 0;
Expand Down

0 comments on commit b6c3827

Please sign in to comment.