When gyroscope is enabled, default to the heading-end value.
pitch should always be natural. The ground should always be beneath the user in the experience.
cc @ampproject/wg-stories
Glad to see you're considering this 馃槂
This should be reset on page navigation, not on load, I think? Otherwise, you're not guaranteed to be looking in the correct direction when you actually navigate to the page.
The new scene-heading attribute could possibly solve this, or more precisely the new this.renderer_.setImageOrientation we introduced for it. We could update image orientation when starting the gyro, offsetting the scene heading by the current heading read by the sensor.
The new
scene-headingattribute could possibly solve this, or more precisely the newthis.renderer_.setImageOrientationwe introduced for it. We could update image orientation when starting the gyro, offsetting the scene heading by the current heading read by the sensor.
100%
I think you did most of the work this in #30138 :)
Thanks so much Tom!
BTW, shouldn't we use heading-end if provided, instead of heading-start ? When an animation is provided it's likely that the point of interest is at the end, besides it would be less jarring if the gyro is enabled afterwards. WDYT?
I agree it's safe to assume heading-end is the point of interest. Good call.
Most helpful comment
BTW, shouldn't we use
heading-endif provided, instead ofheading-start? When an animation is provided it's likely that the point of interest is at the end, besides it would be less jarring if the gyro is enabled afterwards. WDYT?