You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Atmosphere addon fixes for floating origin (#17378)
- Ensure atmosphere parameters get computed correctly when floating
origin is enabled, assuming planet center is 0,0,0 in world space.
- Use common dot product helper
- **NOTE:** Minor breaking change to API; Include `Camera` as parameter
to some existing observables that were previously `Observable<void>`.
Copy file name to clipboardExpand all lines: packages/dev/addons/src/atmosphere/atmospherePerCameraVariables.ts
+35-15Lines changed: 35 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -86,13 +86,18 @@ export class AtmospherePerCameraVariables {
86
86
87
87
/**
88
88
* The camera position in global space kilometers.
89
+
*
90
+
* The behavior of this value depends on whether floating origin mode is enabled:
91
+
* - If floating origin mode is enabled, this is simply the camera's global position scaled to kilometers. The atmosphere's origin height is used to offset the camera position along its geocentric normal.
92
+
* - If floating origin mode is disabled, the camera's y position is offset by the planet radius plus any origin height.
89
93
*/
90
94
publicgetcameraPositionGlobal(): IVector3Like{
91
95
returnthis._cameraPositionGlobal;
92
96
}
93
97
94
98
/**
95
99
* The camera position, clamped to the planet radius offset, in global space kilometers.
100
+
* See {@link cameraPositionGlobal} for details on how the value is computed.
0 commit comments