Skip to main content
Discovery icon for Official Unity Discord Discord server

Official Unity Discord

32,266 Online
140,056 Members
# 💻┃code-beginner3 people

predictable 2D ball bounce mechanics

Achieving predictable ball bounces requires either caching velocity to invert axes manually or replacing dynamic physics with custom circle casting.

  • Relying on dynamic Rigidbody2D physics causes unwanted velocity drops and inconsistent bounce angles against moving enemies
  • A simple fix is caching velocity in FixedUpdate and inverting either the X or Y component upon collision based on the contact surface
  • Using Physics2D.CircleCast and handling movement entirely in code provides full deterministic control over trajectories
  • Unity's low-level 2D physics or Physics 2D Core package allows querying collisions beforehand, though it requires a major rework
Summarized from recent messages, might be inaccurate

More conversations

Talk, Play, &
Hang Out

Find your space to hang out, discuss the latest updates with the party chat, and see who's down to join your next match.
Get App