Hology
Hology
Hology
  • 👋Welcome to Hology Docs
  • Getting started
    • Introduction to Hology
    • The first steps
    • Editor basics
      • Flying in scenes
      • Placing objects
      • Select objects
      • Transform
      • Grouping objects
      • Duplicate
    • Starter project - Third person shooter
  • Tutorials
    • Rolling ball - Gameplay programming
    • Character movement programming
    • Character AI behavior
  • Release
    • Distribution
      • Discord Activities
      • Facebook Instant Games
      • Upload to Itch.io
      • Host with GitHub Pages
      • Publishing to Steam
      • iOS and Android
  • Assets
    • 3D Models
      • Custom collision shapes
      • Material slots
    • Materials
    • Textures
    • Prefabs
  • Gameplay
    • Actors
      • Creating actor classes
      • Actor parameters
      • Actor components
      • Actor lifecycle
      • Spawning actors
      • Moving actors
    • Services
      • Load assets
    • Player input
    • Collision detection
    • Physics
      • Physics body types
      • Applying forces
      • Ray casting
    • Trigger volumes
    • Character movement
    • Pointer events
    • Animation
      • Animation system
      • Character Animation
      • Animation State Machine
    • Sound
      • Audio parameter
    • World
    • Navigation
  • Shaders
    • Introduction to shaders
    • Creating shaders
    • Shader parameters
    • Typescript shaders
      • Types
      • Math functions
      • Attributes
      • Varying
      • Uniforms
      • Textures
      • Arrays
      • Select
      • Lighting
    • Painted materials
    • Water shader tutorial
  • Level design
    • Landscape sculpting
    • Landscape painting
    • Grass
  • User Interfaces
    • Creating user interfaces
    • Using React
    • VR
  • Visual Effects
    • Introduction to VFX
    • VFX Assets
  • Integrations
    • Arcweave
Powered by GitBook
On this page
  • Defining collision shapes
  • Shape types
  1. Assets
  2. 3D Models

Custom collision shapes

Previous3D ModelsNextMaterial slots

Last updated 1 year ago

Being able to control the exact shape of the shapes used for detecting collision is important for a good experience. The auto-generated collision shapes may also not be sufficient for some more complex 3D models. For better performance, it can sometimes be better to use multiple simple shapes rather than one complex one. All of this can be accomplished by defining your own shapes as part of the 3D model before exporting it in your 3D modeling tool.

Defining collision shapes

In your 3D modeling tool, you can create meshes and give them a name with a special prefix which Hology Engine can use to understand that this mesh is meant for defining the object's collision shape and will also not be visible. You can have multiple collision shapes and they will be combined into a single composite collision shape in Hology.

Shape types

The different shapes supported are listed below with their object name prefix in brackets.

  • Sphere (USP_): A spherical shape. For collision detection is is the least computationally expensive shape.

  • Box (UBX_): A shape with 6 sides and 90 degree corners.

  • Convex hull (UCX_): A shape with no indents similar to a box or a sphere but can accommodate geometries that are a bit more complex.

  • Trimesh (UTM_): A shape that is made up of all the triangles in the mesh. This is suitable if you have complex geometry and it is important that the collisions are very precise. This is less performant compared to other shapes so if possible, try using multiple simpler shapes instead of a trimesh.