Skip to content

OBB System

The OBB system provides precise 3D collision detection for titan attacks, replacing old radius-based damage with shaped hitboxes that rotate with the entity.

An Oriented Bounding Box is a 3D shape that:

  • ✅ Rotates with the entity’s look direction
  • ✅ Has precise collision detection
  • ✅ Supports 6 different shapes
  • ✅ Can be positioned relative to the entity
  • ✅ Integrates with telegraph system

vs Radius Damage

❌ Radius: Sphere only, no rotation ✅ OBB: 6 shapes, rotates naturally

vs MoLang Math

❌ MoLang: Complex manual calculations ✅ OBB: Built-in collision detection

Performance

OBBs use native collision code, faster than MoLang loops

Visual Clarity

OBB telegraphs show EXACT attack zones

Every OBB attack follows this pattern:

{
"timeline": [
// 1. DEFINE - Create the OBB
{
"type": "define_obb",
"name": "my_attack",
"shape": "CONE",
"positioning": "IN_FRONT",
"distance": "2.5",
"halfExtents": {"x": "1.5", "y": "5.0", "z": "1.5"}
},
// 2. TELEGRAPH - Show warning (optional)
{
"type": "telegraph_obb",
"obbName": "my_attack",
"color": "WARNING",
"duration": "800",
"markerDensity": "25"
},
// 3. DAMAGE - Apply damage
{
"type": "damage_obb",
"obbName": "my_attack",
"damage": "q.move_damage",
"expressions": ["q.damage_all(q.move_damage)"]
}
]
}

Creates an OBB that can be referenced by later keyframes.

{
"type": "define_obb",
"name": "attack_zone",
"shape": "SPHERE",
"positioning": "AT_TARGET",
"distance": "3.0",
"halfExtents": {"x": "5.0", "y": "5.0", "z": "5.0"},
"includePitch": true
}

Unique identifier for this OBB:

"name": "flamethrower_cone"
// Reference later: "obbName": "flamethrower_cone"

One of 6 collision shapes:

ShapeDescriptionBest For
SPHEREBall centered at originExplosions, radial attacks
CONECone pointing forwardBreath attacks, beams
CYLINDERCylinder along forward axisLightning bolts, charge attacks
ARC180° arc in frontClaw swipes, tail attacks
BOXRectangular boxGround pounds, walls
CAPSULECylinder with rounded endsDash attacks

How to position the OBB:

ModeDescriptionUse Case
AT_TARGETCenter on attack targetTargeted explosions
AT_USERCenter on titanSelf-centered AOE
IN_FRONTIn front of titanDirectional attacks
// Most common for directional attacks
"positioning": "IN_FRONT"

Blocks in front of entity:

"distance": "2.5" // 2.5 blocks forward
// Adjust based on attack range:
"distance": "1.0" // Close-range (bite, slash)
"distance": "3.0" // Medium-range (sweep)
"distance": "5.0" // Long-range (beam)

Custom offset in local space (forward, up, right):

"offset": {"x": "0", "y": "2.0", "z": "5.0"}
// x = right (+) / left (-)
// y = up (+) / down (-)
// z = forward (+) / backward (-)

Half-widths along each axis (actual size is 2x these values):

"halfExtents": {"x": "3.0", "y": "2.0", "z": "5.0"}
// Creates a 6×4×10 block box

Shape-Specific Usage:

"shape": "SPHERE",
"halfExtents": {"x": "5.0", "y": "5.0", "z": "5.0"}
// Only X matters (radius)
// Creates 5-block radius sphere

Whether to rotate OBB with entity’s up/down look:

// Rotate with look direction (for beams, breath)
"includePitch": true
// Stay horizontal (for ground attacks)
"includePitch": false

Shows visual warning markers on the ground.

{
"type": "telegraph_obb",
"obbName": "attack_zone",
"playSound": true,
"soundPitch": 0.6,
"telegraphText": "FLAMETHROWER!!!",
"color": "WARNING",
"duration": "800",
"markerDensity": "25"
}

Name of OBB to visualize:

"obbName": "flamethrower_cone"

Threat level determines color and sound:

ColorHexSound PitchUse For
WARNINGYellow1.0Light attacks (8-12 dmg)
DANGEROrange0.7Medium attacks (13-16 dmg)
CRITICALRed0.4Ultimate attacks (21+ dmg)
"color": "DANGER"

How long telegraph shows (milliseconds):

"duration": "800" // 0.8 seconds
// Balance warning time:
"duration": "600-800" // Light attacks
"duration": "800-1200" // Medium attacks
"duration": "1200-1800" // Ultimate attacks

Markers per unit length:

"markerDensity": "15" // Sparse (performance)
"markerDensity": "25" // Standard
"markerDensity": "40" // Dense (clear warning)
"markerDensity": "50" // Very dense (ultimate attacks)

Higher = more visible but more lag.

Text shown above markers:

"telegraphText": "FLAMETHROWER!!!"

Play warning sound:

"playSound": true

Sound pitch (lower = more ominous):

"soundPitch": 0.4 // Deep, ultimate attack
"soundPitch": 0.6 // Medium threat
"soundPitch": 1.0 // Light attack

Applies damage to entities within the OBB.

{
"type": "damage_obb",
"obbName": "attack_zone",
"damage": "q.move_damage",
"expressions": [
"q.damage_all(q.move_damage)",
"q.knockback_all(0.0, 1.0, 0.0)"
],
"delay": "0"
}

Name of OBB to use:

"obbName": "flamethrower_cone"

Base damage value (MoLang expression):

// Use move's configured damage
"damage": "q.move_damage"
// Fixed damage
"damage": "15.0"
// Scaled damage
"damage": "q.move_damage * 1.5"

MoLang scripts to run on entities:

"expressions": [
"q.damage_all(q.move_damage)",
"q.knockback_all(0.0, 1.5, 0.0)",
"q.apply_burn(2.0)"
]

See Damage Functions for all options.

Delay before damage (seconds):

"delay": "0.5" // Wait 0.5s after telegraph
{
"timeline": [
{"type": "add_holds", "holds": ["effects"]},
{"type": "stop_movement", "duration": "2500"},
// Define 8-block cone
{
"type": "define_obb",
"name": "flamethrower",
"shape": "CONE",
"positioning": "IN_FRONT",
"distance": "2.0",
"halfExtents": {"x": "2.0", "y": "8.0", "z": "2.0"},
"includePitch": true
},
// Telegraph warning
{
"type": "telegraph_obb",
"obbName": "flamethrower",
"color": "WARNING",
"duration": "800",
"markerDensity": "25",
"telegraphText": "FLAMETHROWER!"
},
{"type": "pause", "pause": 0.5},
{"type": "animation", "animation": ["special", "fire"]},
// Damage
{
"type": "damage_obb",
"obbName": "flamethrower",
"damage": "q.move_damage",
"expressions": [
"q.damage_all(q.move_damage)",
"q.apply_burn(3.0)"
]
},
{"type": "set_vulnerable", "vulnerabilityType": "RECOVERING", "duration": "1.0"},
{"type": "remove_holds", "holds": ["effects"]},
{"type": "pause", "pause": 1.0}
]
}
{
"timeline": [
{"type": "add_holds", "holds": ["effects"]},
{"type": "stop_movement", "duration": "4000"},
// Define 12-block sphere at titan
{
"type": "define_obb",
"name": "explosion",
"shape": "SPHERE",
"positioning": "AT_USER",
"halfExtents": {"x": "12.0", "y": "12.0", "z": "12.0"}
},
// Critical warning
{
"type": "telegraph_obb",
"obbName": "explosion",
"color": "CRITICAL",
"duration": "1500",
"markerDensity": "40",
"telegraphText": "EXPLOSION!!!"
},
{"type": "pause", "pause": 1.0},
// Damage with knockback
{
"type": "damage_obb",
"obbName": "explosion",
"damage": "q.move_damage",
"expressions": [
"q.damage_all(q.move_damage)",
"q.knockback_all(0.0, 2.0, 0.0)"
]
},
{"type": "set_vulnerable", "vulnerabilityType": "EXHAUSTED", "duration": "2.5"},
{"type": "remove_holds", "holds": ["effects"]},
{"type": "pause", "pause": 2.0}
]
}
{
"timeline": [
{"type": "add_holds", "holds": ["effects"]},
{"type": "stop_movement", "duration": "1800"},
// Define 180° arc
{
"type": "define_obb",
"name": "claw_swipe",
"shape": "ARC",
"positioning": "IN_FRONT",
"distance": "1.0",
"halfExtents": {"x": "5.0", "y": "3.0", "z": "5.0"}
},
{
"type": "telegraph_obb",
"obbName": "claw_swipe",
"color": "WARNING",
"duration": "600",
"markerDensity": "20"
},
{"type": "animation", "animation": ["special", "attack"]},
{
"type": "damage_obb",
"obbName": "claw_swipe",
"damage": "q.move_damage",
"expressions": ["q.damage_all(q.move_damage)"]
},
{"type": "set_vulnerable", "vulnerabilityType": "RECOVERING", "duration": "0.8"},
{"type": "remove_holds", "holds": ["effects"]},
{"type": "pause", "pause": 0.8}
]
}
Attack TypeRecommended Shape
Breath/BeamCONE or CYLINDER
ExplosionSPHERE
Claw/TailARC
ChargeCAPSULE
Ground PoundBOX
LightningCYLINDER

Balance between fair warning and game feel:

Attack DamageTelegraph Duration
Light (8-12)0.6-0.8s
Medium (13-16)0.8-1.2s
Heavy (17-20)1.0-1.5s
Ultimate (21+)1.4-1.8s

Consider titan scale and player mobility:

RangehalfExtents ExampleUse Case
Closex:3, y:2, z:3Melee attacks
Mediumx:5, y:3, z:7Standard attacks
Longx:7, y:5, z:12Ranged attacks
Ultimatex:12, y:8, z:12AOE explosions
  • ✅ Check duration > 0
  • ✅ Check markerDensity reasonable (15-50)
  • ✅ Ensure GameTest enabled (1.21.1+)
  • ✅ Check render distance
  • ✅ Verify obbName matches define_obb name
  • ✅ Check expressions syntax
  • ✅ Ensure entities are within OBB bounds
  • ✅ Check player gamemode (creative ignores damage)
  • ✅ Check positioning mode
  • ✅ Verify distance value
  • ✅ Try toggling includePitch
  • ✅ Use telegraph to visualize actual hitbox

Master OBBs to create precise, readable boss attacks!