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
2D Capsule Colliders are changing positions after collisions

Hello
I am working on some player controllers and I have noticed that my colliders are changing positions when they collide with other objects. You can see in the first image that the colliders go beyond the edge of the sprite, so the characters should be floating in the game scene, but going into scene view whilst the game is running, the capsule colliders have clearly moved. I added the leftmost character as a control, using a capsule collider again, but this one clearly has accurate collision detection. The final image also shows the scene view when the colliders are actually set up accurately, to match the size of the player characters. The issue obviously being that they appear to fall into the floor.

Initially, I thought that the collision detection noscripts could be the cause of the issue, but then I attached the PlayerController noscript (which includes the collision calculations), and it didn’t make a difference. So the two pink character objects are essentially identical. The only difference between them is that the one furthest left does not have the empty child objects that control the animations, but these don’t reference the collider in any way, so I doubt they would be causing this issue. Other objects that I tested with the capsule collider on also demonstrated visually accurate collisions. The.

If anyone has any ideas what could be causing this inconsistency, please let me know and I can provide more information if needed. Thanks!

Comparison with offset colliders that allow the characters to stand above the ground

Scene view with accurate colliders, before game is running

Scene view with accurate colliders, game is running



https://redd.it/1l1f9pp
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
We thought our UI was fine… then we added this. Curious what others are doing.

https://redd.it/1l1e7qq
@r_Unity3D
Media is too big
VIEW IN TELEGRAM
I've made it! After 12 years of solo dev on Unity, I'm releasing "Zefyr", my adventure game today! My childhood dream is coming true. I can't believe this!

https://redd.it/1l1ltgj
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
New WIP battle animation in our tactical game on Unity. Working on improving it. Any suggestions?

https://redd.it/1l1oslk
@r_Unity3D
Favorite flat/toon shader?
https://redd.it/1l1n8fp
@r_Unity3D