Hi Catie - great tutorial so far! I had a question if you had a moment to answer…
I’m unable to get my eyelid to rotate around the z-axis. I’ve created my own robot and I’m able to successfully get the eyelid to blink as expected. But once I introduce the z-axis, it continues to blink, but never rotates around the z-axis.
Here’s my code:
robot.topLidL?.orientation = simd_mul(
simd_quatf(angle: deg2rad(-80 + (130 * eyeBlinkLeft)), axis: [1, 0, 0]),
simd_quatf(angle: deg2rad((130 * browLeft) - (60 * browInnerUp)), axis: [0, 0, 1])) // z-axis
I get 0 movement at all around the z-axis. I downloaded your example, and it does in fact work. I confirmed that I am getting values from browLeft
and browInnerUp
. I looked at the assets in Reality Composer and all looks well. An interesting note is if I change the Z value in Reality Composer, I do see the rotation in Composer as I would expect.
I also just tried
robot.topLidL?.orientation = simd_quatf(angle: deg2rad((130 * browLeft) - (60 * browInnerUp)), axis: [0, 0, 1])
and that doesn’t work either. I even just hardcoded:
robot.topLidL?.orientation = simd_quatf(angle: deg2rad(50), axis: [0, 0, 1])
And even that didn’t cause any change.
Simply put, I’m getting no movement at all around the z-axis.
Do you have any ideas why this might be the case?