Publisher | twoloop |
---|---|
File size | 10.93MB |
Number of files | 40 |
Latest version | 1.3.7 |
Latest release date | 2022-11-17 02:51:44 |
First release date | 2021-12-21 09:18:13 |
Supported Unity versions | 2018.4.2 or higher |
Origin Shift
Tired of jitter or flicker at far distances from the world origin?
Need a network-ready, drag and drop solution for your Mirror game?
Origin Shift is the go-to solution for these common floating precision issues.
Origin Shift is a flexible client-side world-origin recentering framework that will solve:
- vertex jitter
- flickering lights
- rendering issues
- physics issues
- snappy movement / camera movement
- syncing Rigidbody & Transform positions (Components for Mirror v46.0.4 - Newer versions may have incompatibilities)
- NavMeshAgent/AI bugs
This asset is useful for open world exploration, space games, survival games, procedurally generated maps!
Perks:
- Accuratley syncs positions as far as 100 trillion lightyears
- Float, Double, and Decimal precision modes
- Supports VFX graph, ParticleSystem, LineRenderer, TrailRenderer
- Configurable distance threshold and tick delay
- Optional continuous recentering
- Singleplayer, P2P, and Dedicated
- Fully commented code
- 4 page pdf guide
- Mirror components
- 2 demo scenes
- Supports GPU Instancer (GPUI)
- Supports Realistic Car Controller (RCC)
- Seamless drag n drop integration
- Invisible world recentering
- Demo scenes & tutorials
Architecture:
Each client moves the objects in their worlds to recenter the player when a distance threshold is passed (or continuously). Origin Shift will then syncronize client positions based on their respective world offsets. This functionality can easily be extended via Origin Shift's API.
This asset brings you flexibility to customize the frequency and precision level for recentering which can be more performant and customizable than a rigid continuous solution.
Disclaimers / Usage Tips
- Components for Mirror v46.0.4 - Newer versions may have incompatibilities
- If you have world space height fog you must not use the vertical recentering feature
- If you use world space shaders you may consider converting them to object space or introducing a global shader variable for Origin Shift space by hooking to the OriginShift.OnOriginShifted(Vector3 newOffset, Vector3 translation)
- Objects marked static won't work
- Doesn't fix rendering problems with meshes that are insanely large. (ex. a 100000 x 100000 plane flickering)
- Physics calculations still depend on a certain client's origin (usually the host)
- Physics interactions setups / controllers may have noticable jitter during frequent recentering
- Not a solution for placing distant objects in edit mode. Instead you should dynamically load/unload distant objects at runtime. (planet position table etc.)
- Any scripts which store positions should update those positions upon origin shift. To do this you should make use of the OriginShift.OnOriginShifted event