r/Unity3D – Telegram
r/Unity3D
260 subscribers
12.6K photos
15.5K videos
14 files
47.8K links
News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
Download Telegram
Need Advice on Managing Traffic in a Top-Down 2D Game

I’m working on a top-down 2D game where cars move between nodes on a network. It’s a large-scale system with potentially 100+ cars navigating through a map containing around 1000 nodes. The core mechanic works well enough with basic pathfinding, but I’m running into a few issues as I try to make the traffic system more dynamic and realistic.

I need help with:

1. anticipating collisions, as right now, cars follow their paths without considering others, which results in collisions at intersections or when paths overlap. I’d like the cars to anticipate potential crashes and take evasive action, but I’m unsure of the best way to implement this at scale without bogging down performance.
2. I want cars to behave differently based on “personalities” (e.g., cautious cars, aggressive drivers, etc.). This would mean some cars yield while others take risks. It needs to feel organic and work seamlessly within the system.

What I’ve Tried So Far •

Node-Based Pathfinding (A): Each car calculates its route to a destination using A. Works fine, but it doesn’t account for dynamic obstacles like other cars.

Basic Collision Avoidance: I’ve implemented a simple system where cars stop if they’re too close to another. This works for straight paths but causes traffic jams and looks very mechanical.

Global Priority System: I experimented with assigning priorities to cars at intersections, but it doesn’t scale well with many cars and nodes, as it becomes too computationally heavy.

hasmap for Position Tracking: I tried using a hashmap to store and update car positions so each car knows where others are relative to itself. This helped a bit with awareness but became expensive as more cars entered the system.

Advice and examples would be very welcomed. Thanks for any help in advance!

https://redd.it/1hk24n6
@r_Unity3D
how make a dialog box in my 2d platform game on unity with visual noscripting?

how make a dialog box in my 2d platform game on unity with visual noscripting?

https://redd.it/1hk5in5
@r_Unity3D
Animation Question

Hello!

I am working on a 2D project and I have run into a bit of a problem. The game I'm making is a 2D grid based tactics game. I am implementing animations currently, and I have 4 directions for idle, walking, moving, etc.

The problem is, if a character gets hit, I need to make into account which way they were facing, and where the hit came from. So that's 4x4=16 animations. Is there any way I can avoid this, and reduce the amount of animations I need to make?

Thanks!

https://redd.it/1hk8wus
@r_Unity3D
Bridge in the mountains
https://redd.it/1hkcml9
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
I'm finally content with our custom building system that alters the terrain

https://redd.it/1hkch9i
@r_Unity3D
Our previous investor left us, and for the past two years, my husband and I have been creating a pixel art adventure game entirely with our own funds and through the personal experience of trial and error.
https://www.youtube.com/watch?v=biegtZltbhc

https://redd.it/1hkgbl4
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
First look at my Space RTS game in early development - Would love your feedback!

https://redd.it/1hkhl62
@r_Unity3D
Are Brackey’s tutorials still a solid way to learn Unity?

The tutorials are seven years old at this point. Are they dated? Are they still useful for someone with no Unity experience to learn the system? Are there any alternatives you’d recommend to a complete beginner?

https://redd.it/1hk6xn1
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Working on a platformer where you play the main melody of the stage. The song is just a cover I made btw.

https://redd.it/1hkjkzg
@r_Unity3D
Birds everywhere! 🐦🐦🦉🐦
https://redd.it/1hkm5xb
@r_Unity3D
Canvas Visible but Gameplay Offscreen/Invisible on Mobile Devices (Unity Build Issue)

Hi everyone,

I'm facing an issue with my 2D Unity game where the UI canvas displays perfectly on mobile, but the actual gameplay is not visible—it seems to be offscreen or not rendering. Here's a breakdown of my setup and the problem:

* **What Works:**
* The game runs fine on PC and even on emulators like BlueStacks.
* UI canvases (like the main menu, victory screen, etc.) display properly on mobile.
* **The Problem:**
* After pressing "Play" on the mobile device, the game appears to load, but the gameplay elements (like the player and obstacles) aren't visible.
* The game logic is working because touching the screen rapidly progresses through win screens and other canvases, but I can't see any gameplay visuals.
* **What I’ve Tried:**
* Verified the camera position and its settings (Clear Flags: Skybox, Viewport Rect: 0,0 to 1,1).
* Checked that gameplay elements aren’t on layers excluded by the camera’s Culling Mask.
* Adjusted the Canvas Scaler to **Scale With Screen Size** with a reference resolution of 1920x1080.
* Ensured that gameplay objects are within the camera's view frustum and not behind other objects.

Has anyone faced a similar issue? Could this be related to screen resolution or some rendering issue with the camera or canvas? Any suggestions for debugging this on mobile would be greatly appreciated!

Everything works perfectly in the Unity Editor and on PC builds, but the problem only occurs on actual mobile devices.

https://redd.it/1hkkzy4
@r_Unity3D