LogoLogo
  • Get Started
  • Getting Started
    • Initial Setup
    • Create Your First Game
    • API Reference
    • Build Your First World Map
    • Multiplayer Testing
    • Use Templates & Examples
    • Styling & Assets
      • Modeling Guidelines
      • Texturing Guidelines
      • Default Assets
  • Build Faster With AI Tools
  • SDK Guides
    • Assets
    • Audio & SFX
      • Audio Manager
    • Blocks & Chunks
      • Block Types
      • Block Type Registry
      • Chunks
      • Chunk Lattice
    • Camera
    • Chat & Commands
    • Debugging
    • Entities
      • Animations
      • Block Entities
      • Colliders & Hitbox
      • Child Entities
      • Entity Controllers
        • Base Entity Controller
        • Pathfinding Entity Controller
        • DefaultPlayer Entity Controller
        • Simple Entity Controller
      • Entity Manager
      • Model Entities
      • Movement & Pathfinding
      • Player Controlled Entities
    • Events
    • Input & Controls
    • Lighting
      • Ambient Light
      • Light Manager
      • Point Lights
      • Spot Lights
      • Sun Light (Directional)
    • Mobile
    • Persisted Data
    • Players
      • Player Manager
      • Persisted Player Data
    • Plugins
    • Physics
      • Colliders
      • Collision Groups
      • Debugging
      • Gravity
      • Raycasts
      • Rigid Bodies
    • User Interface
      • Overlay UI
      • Scene UIs
      • Scene UI Manager
    • Worlds
      • Map Data Format
  • Helpful Resources
    • HYTOPIA Architecture & Platform Overview
    • Useful Third-Party Tools
Powered by GitBook
On this page
  • Core Concepts
  • Next Steps
Export as PDF
  1. SDK Guides

Physics

PreviousPluginsNextColliders

Last updated 4 months ago

Physics are at the core of nearly all game mechanics in HYTOPIA. Physics control how entities interact with each other and their world.

Nearly every game mechanic starts with physics, but don't worry! HYTOPIA physics were created to be as easy as possible for you to begin working with and understand!

Core Concepts

Let's start with an overview of core concepts within the HYTOPIA physics system.

Next Steps

- A collider is a shape that can collide with other shapes. A collider could be a "hitbox" of an entity, the shape that approximates terrain in the world that other entities or colliders can collide with, or a sensor that does not physically collide but detects when objects enter and exit its shape.

- Collision Groups allow you fully control if a collider will or will not collide with another collider.

- Sometimes you'll need to visualize physics. This means being able to see the outlines of colliders, raycasts and rigid bodies in real time.

- Simple, gravity! You can fully control gravity in your game. Remove it, change it, make it apply in a different direction, etc.

- An invisible line (ray) in physical space that starts at a coordinate, extends in a direction for some provided length, and returns the first entity or block it intersects with, if any. Raycasts are often used for things like seeing if a bullet shot by a player hits another player, if a player is close enough to something to interact with it, and much more.

- A rigid body is an object typically made up of 1 or more colliders that interacts with the physical world. The rigid body and its child colliders ultimately define how the rigid body interacts with a world physically. An entity for example is also a rigid body and inherits all its behaviors. Rigid bodies can have linear and rotational forces applied to them, amongst many other things.

Colliders
Collision Groups
Debugging
Gravity
Raycasts
Rigid Bodies

Colliders

Learn more about colliders and how they make up the foundation of a world's physical interactions.

Collision Groups

Learn more about collision groups and using them to specify what colliders can and cannot collide.

Debugging

Learn how to debug physics and enable debug rendering to visualize a world's physics elements.

Gravity

Learn how to change a world's gravity and how it affects a world's physical interactions.

Raycasts

Learn how to use simple raycasts to create exciting game mechanics and behaviors.

Rigid Bodies

Learn more about rigid bodies, applying forces, and controlling their interactions with the physical world.

A debug visualization of the rigid body & collider of a player entity, and colliders that make up a world's terrain.