FloatingOrigin
No description available
Install / Use
/learn @FriendsOfSpatial/FloatingOriginREADME
Floating Origin Component
The Floating Origin component is meant to shift the X and Z coordinate's origin point (0,0) based on whether game objects are inside or outside of a predetermined area or dimensions.
Verified on Spatial OS versions: 9.1.0, 10.0.0, 10.1.0
Usage
- Add the Floating Origin component to a pre-existing GameObject in your scene such as the GameEntry object.
- Define which layers should be tracked by this component; it is recommended to place all SpatialOS EntityPrefabs on their own layer, for example 'entities', and use that to track which entities' their origin should be moved.
- On all locations where you pass coordinates to workers, first use the
Unshiftmethod of theVector3class to ensure you are using global coordinates. - On all location where you receive coordinates from workers, first use the
Shiftmethod of theCoordinatesclass to change the position to use the shifted offset.
Tips
- Always use the Coordinates class to maintain your World Coordinates; this is
a
doubleand as such can manage larger world positions without suffering from floating point imprecisions. - Always use Vector3 for your local coordinates in the Client or Worker where you use this component; the Vector3 class has an extension method to work with this component and interacts seamlessly with Unity.
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
