Skip to content

Commit 1f942dc

Browse files
committed
Rotation sequence (ZYX) + Frame origin
- The rotation sequence used is yaw, pitch, roll - The frame origin is (0, 0, 0)
1 parent b858e8a commit 1f942dc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/controllers/Entity.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default class Entity {
9393

9494
addEuler(props) {
9595
this.rotations.push(
96-
new THREE.Euler(props.roll, props.pitch, props.yaw, "XYZ")
96+
new THREE.Euler(props.roll, props.pitch, props.yaw, "ZYX")
9797
);
9898
}
9999

@@ -157,9 +157,10 @@ export default class Entity {
157157
setReference(e) {
158158
// we set the first position as the reference
159159
if (e.useXYZ) {
160-
this.ref_x = e.props[0].x;
161-
this.ref_y = e.props[0].y;
162-
this.ref_z = e.props[0].z;
160+
this.ref_x = 0;
161+
this.ref_y = 0;
162+
this.ref_z = 0;
163+
163164
} else {
164165
this.ref_x = 0;
165166
this.ref_y = 0;

0 commit comments

Comments
 (0)