promotional bannermobile promotional banner

Sulfur Cube Steering

Steers Sulfur Cubes by the angle between the shot and the cube center instead of the raw knockback direction
item image

Description

Sulfur Cube Steering

Makes Sulfur Cubes steer the way their knockback direction suggests: the push is rotated relative to the shot instead of being applied straight along the projectile's velocity, so aiming at the side of a cube (for example while driving an ice boat) turns it.

How it works

SulfurCube#knockback only ever sees the projectile's velocity, so hitting the left or right edge of the hitbox produced the same push. This mod mixins the horizontal knockback angle:

  • The reference direction is always the incoming direction (projectile velocity, or the attacker's look vector for melee).
  • The deflection is derived from how far the aim line passes from the cube's center: ratio = perpendicular distance / half-width in that direction (0 = aimed at the center, 1 = grazing an edge).
  • The deflection angle follows a logarithmic curve and is applied as a rotation of the incoming direction, capped at 85°, so the cube can never be pushed back toward the attacker.
  • The knockback magnitude is scaled by 1 / cos(θ), so the component along the original heading stays unchanged and only the lateral component grows.
  • No hit point is read, so far-side / overshoot hits cannot flip the direction.

Sulfur Cube Steering Team

profile avatar
  • 3
    Followers
  • 23
    Projects
  • 45.0K
    Downloads

More from XiaoColorfulView all