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 pack includes tools for clay modeling in ZBrush 4R8: 7 brushes, 10 alphas, Fingerprint texture.

Join discussion

Comments 0

    You might also like

    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.

    Breaking: Unity Suddenly Lays Off Numerous Developers With a 5 AM Email

    Apparently, the entire Unity Behavior team was cut, alongside many other employees.

    EXCLUSIVE: Unity CEO's Internal Announcement to Staff Amidst the Layoffs

    80 Level has obtained the text of the email sent by Matthew Bromberg to Unity employees, announcing the layoffs and shedding light on Unity's strategy going forward.
    • Desert Eagle MAG50
      by Abderrezek Bouhedda

      This game ready weapon will help you in your game or in your renders, just drag and drop it into your game engine. The weapon is modeled part by part including perfect UV Unwrapping and PBR Textures.

    • Horror VDM Brush
      by Nicolas Swijngedau

      Special brush for halloween, perfect for detailing your ghosts, devils and various killing machines!

    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

    ×