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
2D OnTrigger/OnCollision isn't Accurate Enough

So, I'm making a game in which I rectangular room and the enemies interact with the boundaries frequently.
I'm using a Kinematic Rigidbody2D because I want to control their movement completely.
Everything works great but one thing- collision detection.

For example, I got an enemy that bounces like a rubber ball.
I saw differences of height when he lands, so I ran a Debug.Log on the Y position of an enemy when it hits the ground.
Each time I got a different Y, and the faster the ball the more inaccurate it gets.

I do this via update:
Vector3 newPosition = enemy.transform.position + (enemy.Velocity * Time.deltaTime);
My Rigidbody2D is Kinematic, Collision Detection is continuous, and set to interpolate.
I use it primarily for Trigger/Collision purposes.


It sometimes gets to the point where an enemy can "land" mid-way into the floor causing the issue to be easily visible.
Any help will be appreciated tremendously <3

https://redd.it/1hjuf05
@r_Unity3D
Roadmap to learn Unity for 2D game development

Hey folks!

I have some programming experience, but Unity is not just about programming. It offers a lot of tools and features, and I'm wondering what the shortest path is to learn how to make games like FTL, Loop Hero, Super Auto Pets, and more complex games like Ori. Could you please guide me?

https://redd.it/1hjv22k
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Prototyping a windshield shader with wipers. Still not happy with rain drops but pretty much like how the wipers turned out

https://redd.it/1hjx7ag
@r_Unity3D
Question about Pixel-Art and Canvas Size

Hey folks, quick question about Pixel-Art! Imagine following scenario: You're creating a game with the main character and the Enviroment Tiles being 16x16 pixels. Now you're faced with creating a Boss-like enemy and wan't it to exceed the 16x16 pixel boundary and decide to make him 48x48 pixels. After a while of Pixeling it becomes clear that the Boss-like enemy has now substantially more detail than everything else and just doesn't quite to seem to fit in with all other sprites.

TLDR: How to properly scale Pixel-Art, creating bigger Enemies/Enviroment Tiles but keeping the same level of detail as other (smaller) sprites?

Is it just that I use a bigger brush then? (e.g. for 16x16 on a 48x48 grid, using a pixel-brush that covers a 3x3 area?)

https://redd.it/1hjw7zc
@r_Unity3D
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