Shifting Origin#
Crest has support for ‘shifting origin’ functionality, based on code from the Unity Community Wiki which is no longer available.
The Shifting Origin script must be placed on the transform where the world needs to be relative to. Normally the camera.
The Shifting Origin script will call the less resource intensive FindObjectsByType without sorting for a few different component types. It is possible to provide custom lists of components to the “override” fields, either by hand or programmatically, to avoid searching the entire scene(s) for the components. Managing these lists at run-time is left to the user.
Stable World Shifts#
Tip
Not changing the threshold default value is the simplest approach to stable world shifts.
To avoid popping in the waves, the threshold needs to be set to WaveResolution x LargestWavelength. The “WaveResolution” is on the Shape FFT/Gerstner component as just “Resolution”. The “LargestWaveLength” can be found on the Wave Spectrum (the sliders with numbers from 0.0625 to 512) - find the largest number you are using.
For example, a Shape FFT with a resolution of 16 and a largest wavelength of 256 will require a threshold value at a minimum of 4,096 to have stable shifts. You could halve this number once at the cost of some instability, but anything lower will have very noticeable shifts.
Separating larger wavelengths out into their own component, where the resolution can be lower whilst keeping the resolution higher for smaller wavelengths, is one way to mitigate the negatives of this issue.
Limitations#
needs to be at steps of 90° or it will incur popping.