Collision Information

What Are Collision Thresholds?

Collision thresholds determine how your models interact with players and blocks in the game. They use values between 0.0 and 1.0 to represent how much a model overlaps with a block.

  • 0.0: Any tiny overlap counts.

  • 1.0: The model completely fills the block.

  • Example: A value of 0.5 means the model occupies half of the block's space.

These thresholds help the plugin decide when to create invisible barriers (so players can't walk through solid parts) and when to allow models to be placed in the world.

Entity Collision Threshold

This setting controls how your model collides with players and other entities.

  • Purpose: Determines when to place invisible barrier blocks around dense parts of your model.

  • Why It's Important: It prevents players from walking through solid parts of your model, making the model feel more realistic.

How It Works

  • Threshold Value: Set between 0.0 and 1.0.

    • Example Setting:

      entity-collision-threshold: 0.5 # Set to 0 to disable barrier placement
  • If the model fills 50% or more of a block's space (since the threshold is 0.5), the plugin places an invisible barrier there.

  • Players cannot walk through these barriers, so they have to navigate around the solid parts of your model.

Example Scenario

Imagine you've added a custom boulder model to your world:

  • Thick Areas: Parts of the boulder occupy 60% of a block.

    • Barriers are placed here.

    • Players can't walk through these parts.

  • Thin Areas: Other parts occupy only 20% of a block.

    • No barriers are placed.

    • Players can walk through these parts.

Block Collision Threshold

This setting determines whether you can place your model based on its overlap with existing blocks.

  • Purpose: Prevents you from placing models where they would interfere too much with existing blocks.

  • Why It's Important: It avoids visual glitches and ensures fair gameplay by not allowing models to overlap significantly with other blocks.

How It Works

  • Threshold Value: Set between 0.0 and 1.0.

    • Example Setting:

      yamlCopy codeblock-collision-threshold: 0.3 # Set to 0 to allow placement regardless of overlap
  • If placing the model would make it occupy more than 30% of any existing block's space, the plugin stops you from placing it there.

  • This ensures that models don't clip into other blocks or create unfair hiding spots.

Example Scenario

Suppose you want to place a custom bookshelf next to a wall:

  • Overlap with Wall: The bookshelf would overlap 40% of the wall's block.

    • Since 40% > 30%, you can't place it there.

  • Solution: Move the bookshelf slightly so it overlaps only 25%.

    • Now, since 25% < 30%, you can place it.

Tips for Using Collision Settings

  • Adjusting Thresholds:

    • Lower Values: More sensitive to overlaps; barriers are placed more often, and placement is more restricted.

    • Higher Values: Less sensitive; barriers are placed less often, and placement is more permissive.

  • Disabling Features:

    • To disable player collision barriers, set entity-collision-threshold to 0.

    • To allow placement regardless of overlap, set block-collision-threshold to 0.

Last updated