logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

Basic Collision Avoidance Mechanic Set Up in Unity

This raycasts-based mechanic was created by Matheus Reis.

Indie Game Developer and the creator of Vanaris Tactics, a tactical turn-based RPG released in August 2022, Matheus Reis, a.k.a. retromaten, has recently published a couple of impressive demos showcasing a neat collision avoidance game mechanic set up in Unity using raycasts.

According to the developer, the rays update every 10 frames and allow the in-game entities to avoid hitting one another, with the circle itself representing the tolerance of the characters. "Whenever they stop because there's no good direction to move in, they decrease the tolerance, as they'd be getting more nervous," said the creator.

"I cast a ray w/ a length of 2 in each direction and see how far it goes. The ratio between the ray.distance and max distance (2) returns something between 0 and 1," commented the developer. "The remainder (1 - base priority) is passed to neighbors: 50% to X+-1, and 25% to X+-2 ones. The amount of priority they lose by "borrowing" the priority loss from their neighbors is represented by the white part in the line."

Click here to learn more about the setup. Also, don't forget to join our 80 Level Talent platformour Reddit page, and our Telegram channel, follow us on Instagram and Twitter, where we share breakdowns, the latest news, awesome artworks, and more.

This project includes assets, maps, materials, Blueprints, and effects created in the Unreal Engine. Each asset was created for realistic AAA quality visuals, style, and budget.

Error
(2000-0001)

Join discussion

Comments 0

    You might also like

    A Week After "Basically Announcing" Minecraft 2, Notch Basically Cancels It

    Instead, he and his team will focus on the previously-announced retro-style roguelike.

    Discord Gets Sued Over Alleged Anti-Consumer Practices

    The plaintiffs claim the platform has intentionally made it overly difficult to cancel subscriptions.

    Rumor: Possible Release Date for Grand Theft Auto 6 Revealed

    A video game store from Uruguay appears to have disclosed the launch date for the gaming industry's most anticipated title.
    • Creature Brush Mega Pack
      by Nicolas Swijngedau

      100 creature mega pack to speed up your concept creation, spice up your creature designs and smooth your workflow!

      Error
      (2000-0001)
    • 500 Reference Pictures/ Textures For Matte Painting and photobash
      by Mels Mneyan

      Error
      (2000-0001)

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more

    ×