Friday, July 1, 2022
HomeGame DevelopmentUnity - Circle Collider 2D touring the facet of a wall randomly...

Unity – Circle Collider 2D touring the facet of a wall randomly collides with wall nook


I’ve a 2D golf sport that makes use of a Circle Collider 2D on the ball, and I’ve ranges/holes constructed out in Tiled, which I import into Unity utilizing SuperTiled2Unity. Being a considerably retro styled pixel art-y sport, there are quite a lot of straight edges and corners, particularly on partitions. If my ball is colliding with the wall, and I shoot completely straight upward, I’d count on the ball not to collide with the nook of the wall because it falls again down. As an alternative, it should collide with the nook of the wall completely at random. See the .gif I created of the problem beneath – I take a complete of 4 pictures on this gif. They’re on the identical angle (completely straight up), and it does not collide with the wall nook till the 4th shot.

https://imgur.com/a/197zlBO

I do know for a incontrovertible fact that I’m capturing completely straight up, and there are not any different forces at play right here aside from gravity – which ought to pull the ball completely straight again down. Here is a picture of how the colliders look within the scene view:

https://imgur.com/a/pG83CQ5

What might be inflicting this? I attempted establishing an identical situation with an Edge collider for a wall as a substitute of the Polygon Collider that SuperTiled2Unity generates, however the identical points occurred.

I seemed round for fairly a while to see if I may discover anybody with an identical difficulty, however did not see something. Sadly it is considerably of a tough difficulty to explain, and subsequently exhausting to seek for.

Any strategies or concepts for the right way to repair or workaround this might be very appreciated. I really feel like I’ve tweaked and messed with each single presumably related second physics setting inside unity.

(I additionally posted this over on the Unity physics boards – no person replied. I’ve additionally posted it on the Unity2D reddit, and did not get very far with it there.)

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments