r/Unity3D – Telegram
r/Unity3D
266 subscribers
12.7K photos
15.6K videos
14 files
48K links
News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
Download Telegram
How do i make paths with nodes that can have loops...
https://redd.it/1gp56fb
@r_Unity3D
Need help with my character collider.

u/Expensive_News22 helped me fixing this, thanks alot. Had to adjust a few settings in the Layer Collision Matrix. Thanks!

Hey everyone! This is my first post here. I’m a complete beginner with no experience in Unity and just a bit in C#. For my university project, I’m making a 2D platformer game. I have platforms, and the player needs to be able to jump on top of each one, which works fine. But here’s the problem:

* When I use a polygon collider, the player’s head or body keeps getting stuck against walls or platforms, preventing movement.

[Character gets stuck when colliding with the wall or platform. \(In this case, the character actually mini-jumps in place upon collision because I am using a slippery material.\) Red = the collider that is getting stuck on the platform. Yellow marked area is the feet collider, which is not a problem, since it \\"slides\\" from the platform because of the Slip material. \(this is not the polygon collider, but same concept with that one\)](https://preview.redd.it/qj4iojdngb0e1.png?width=336&format=png&auto=webp&s=a61fc18eb441b956b9274d69daa6ea7301e4eb20)

I tried to fix this by limiting the collider to just the player’s feet, and it worked! Now, instead of getting stuck or glitching against walls or platforms, the player just keeps walking. Sounds like it’s fixed, right? But there’s another issue.

[Edited the polygon collider so the body doesn't collide with the wall or platform.](https://preview.redd.it/of2zwiypdb0e1.png?width=343&format=png&auto=webp&s=d5ebec5b1ab5586ac72a6e9f7ba3cce0e5bfe06b)

I also have obstacles (like a spinning saw) that the player needs to crouch to avoid. To make this work, I wanted to animate the collider to match the crouch animation, but I learned you can’t animate polygon colliders—only box or circle colliders for example. So, I created a circle and capsule collider instead and adjusted them for crouching. This solved the issue with the obstacle touching the character correctly.

[Using different colliders to achieve a working crouch collider.](https://preview.redd.it/vd4tg4f2fb0e1.png?width=490&format=png&auto=webp&s=9a94b0f023ebebeb345199fdd22c4890201b3e9d)

[Crouch collider](https://preview.redd.it/hwbose4rfb0e1.png?width=367&format=png&auto=webp&s=f0ae2f70535fb0d2349f635f815927282c685cc0)

But now I’m back to square one: the player is getting stuck on walls and platforms again.

Here’s what I need help with:

1. Ensuring the player has a ground check collider just at their feet (not sure if this is the best way).
2. Preventing the player’s body and head from getting stuck on walls or platforms.
3. Making sure the player can still be hit by obstacles.
4. Ensuring the player isn’t hit when crouching (using a different collider for crouching).

As I mentioned, I’m totally new to this and unsure if my approach is correct. I’ve searched everywhere YouTube, Reddit, Google, and even ChatGPT but I can’t seem to solve this. I’d really appreciate any guidance. Thanks a lot.

https://redd.it/1gozg08
@r_Unity3D
Need Help with Tile Rule Configuration in Unity 2D - Missing Corners Issue!

Hey everyone,

I'm working on a Unity 2D project and running into an issue with my Tile Rules. I'm really close to getting it right, but the configuration is getting a bit overwhelming!

As you can see in the pictures, I can't seem to get certain corners to fill properly. I'm not sure if it's the exterior or interior corners that are missing, but either way, I'm not getting the result I need. I have all the necessary tiles, but I’m struggling with how to set it up in the Inspector to make everything work.

If anyone can guide me through the configuration steps or provide tips on setting up Tile Rules to handle these corners, that would be super helpful!

Thanks in advance!

https://preview.redd.it/bydhamhowd0e1.png?width=876&format=png&auto=webp&s=871ae6d309e08e61e7ee27c66766786702dc9a37

https://preview.redd.it/g2o3mg4pwd0e1.png?width=279&format=png&auto=webp&s=dc00b88f882e20aa72058d885d2254ee50087b5e

https://preview.redd.it/10vuuzkpwd0e1.png?width=272&format=png&auto=webp&s=803f353b71d0641c91dfac43b6645c2144010445



https://redd.it/1gpar5s
@r_Unity3D
Unity Shader not rendering in game

I made a fog shader for my game for this little sewer level using shader graph, but the shader is not being rendered by the camera. All nodes are marked as exposed. I do not have URP installed because when I tried to install it, it came with multiple errors and was presumably missing files, so that option is not possible at the moment unless someone happens to know the solution. Any help would be much appreciated. Thanks in advance.

https://preview.redd.it/okqhc5gqoe0e1.png?width=838&format=png&auto=webp&s=8c68bcb16463305ba83e92a429fc82a4feeac1a8



https://redd.it/1gpdlby
@r_Unity3D
Need advice: Designing intuitive spear-throwing controls for a platformer (controller)

I'm developing my first game, a platformer (obviously :) ) where the core mechanic is throwing a spear, which also provides momentum to the player in the opposite direction (think reverse rocket jump). I'm struggling with making the controls feel smooth and intuitive on a controller.

Current thoughts/challenges:

* Left stick is used for movement, so using it for aim would conflict with the platforming and player's movement
* Right stick seems like the obvious choice for aiming, but I'm concerned it might feel clunky since players need to use this mechanic frequently
* The mechanic needs to feel fluid since it's core to both combat and traversal

Questions:

1. Has anyone implemented similar directional mechanics that worked well with a controller?
2. Are there any games with similar mechanics I should study?
3. What button/stick combination would feel most natural to players?

Any suggestions or examples would be greatly appreciated!

https://redd.it/1gpgga9
@r_Unity3D
How do you achieve Celeste-levels of collision accuracy in Unity?

Celeste has "pixel perfect" collisions and triggers that update one "pixel" at a time, while Unity seemingly updates in "chunks" despite both being set to 60 updates a second.

In this screenshot the character is dashing forward at top speed and will be one "pixel" inside the red trigger on the next frame, making contact. In Unity the character hitbox would be outside one update, then halfway inside the next. What do I change about my project to make interacting with objects as precise as this?

https://redd.it/1gph4ef
@r_Unity3D
AHH NEED HELP ! how can I shorten this period (Compiling)? What precautions should be taken?
https://redd.it/1gpgv1b
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
The only way to get crafting resources in the game Effulgence is by taking down the inhabitants and breaking them into particles. Trying to figure out how this might look. Looks good?

https://redd.it/1gpjvlr
@r_Unity3D
Any idea on how to solve this? My pixel perfect camera is doing this (image below) even though my original sprite looks like above, I tried changing the pixels per unit in the original image, the pixels per unit in the camera, etc. (its an IU image if that's relevant)
https://redd.it/1gpksap
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
Finished up adding various UI themes to my Unity desktop companion game.
https://redd.it/1gpj6ac
@r_Unity3D
First day of Steam Cooking fest
https://redd.it/1gpu0wi
@r_Unity3D
How to generate thousands of grass

so I currently trying to make a 2d open-world game similar to rimworld and factorio. where I generated the world using Perlin noise, I did manage to generate trees, stones or other resources without dropping the fps that much. but I don't think it can handle grass being place almost everywhere. how do I approach it? Thank you!

https://redd.it/1gpumtu
@r_Unity3D
Which mood do you prefer? Left or Right
https://redd.it/1gpr46s
@r_Unity3D