LogoLogo
HomeOnline DashboardAPIDiscordForums
SDK 0.4.14
SDK 0.4.14
  • Welcome
  • Overview
    • What is coherence?
    • How does coherence work?
    • Features and Roadmap
    • Requirements
  • Get Started
    • Install coherence
    • Scene setup
    • Prefab setup
    • Build and run
    • Baking and code generation
    • Create a free account
    • Deploy and share
  • Authority and communication
    • How authority works
    • Authority transfer
    • Commands
    • Server-side and input queues
    • Animations
  • Persistence
    • Overview
    • Configuring persistence
    • Storage
    • Example – A global counter
  • Optimization
    • Overview
    • Simulation frequency
    • Areas of interest
    • World size
    • Level of detail
    • Interpolation
    • Extrapolation
  • Connected entities
    • Overview
    • Entity references
    • ConnectedEntity component
    • Parent-child relationships
  • Simulators
    • Overview
    • Client vs. simulator logic
    • Build and deploy
    • Simulator load balancing
  • Tutorial project
    • Get the Tutorial Project
    • Start Tutorial
      • 1. Transforms
      • 2. Physics
      • 3. Persistence
      • 4. Animation and Variables
      • 5. AI Navigation
      • 6. Network Commands
      • 7. Network Events
  • Game Services
    • Game account
    • Key-value store
    • Matchmaking
  • API reference
    • Network SDK
      • CoherenceSync
      • MonoBridge
      • LiveQuery
      • Archetype
      • Sample UI
      • Settings Window
    • Cloud API
      • API tokens and keys
      • Server discovery
      • Game account
      • Key-value store
      • Matchmaking
    • Replication Server
    • Simulation Server
    • Entity Component System
      • Network Entities and Components
  • Schema reference
    • Overview
    • Specification
    • Field Settings
    • Archetypes and LOD-ing
  • Resources
    • Downloads
    • Video Tutorials
    • Glossary
    • CLI Utilities
    • Helper Scripts
    • Troubleshooting
  • Community
    • Discord
  • Additional information
    • Pricing
    • SLA
    • Unreal Engine support
    • Peer-to-Peer (P2P)
    • Known Issues
    • Version History
Powered by GitBook
On this page
  • LiveQuery
  • Adding a LiveQuery to the scene
  • Moving a LiveQuery

Was this helpful?

Export as PDF
  1. API reference
  2. Network SDK

LiveQuery

Last updated 4 years ago

Was this helpful?

LiveQuery

The way you get information about the world is through LiveQueries. We set criteria for what part of the world we are interested in at each given moment. That way, the replicator won’t send information about everything that is going on in the game world everywhere, at all times.

Instead, we will just get information about what’s within a certain area, kind of like moving a torch around to look in a dark cave.

More complex area of interest types are coming in future versions of coherence.

Adding a LiveQuery to the scene

A LiveQuery is a cube that defined the area of interested in a particular part of the world. It defined by its position and its radius (half the side of the cube). There can be multiple LiveQueries in a single scene.

Moving a LiveQuery

A classic approach is to put a LiveQuery on the camera and set the radius to correspond to the far clipping plane or visibility distance.

Moving the GameObject containing the LiveQuery will also notify the replication server that the query for that particular game client has moved.