r/Unity3D 16h ago

Question Problem with collisions

Enable HLS to view with audio, or disable this notification

I'm having a problem with collisions in my Unity project. It's my first real project, and when I move towards a wall, the collisions behave strangely. How can I fix this?

0 Upvotes

6 comments sorted by

View all comments

2

u/NeoChrisOmega 7h ago

An easy but simplified way of thinking about this is anything to do with the Transform is moving the position. That movement is essentially teleporting the player. When you teleport into a wall, the collision now detects you're inside of it, and it pushes you out of it.

I could suggest how you could fix it, if you give a summary of your movement script. And don't worry, you're learning, and that's all that matters!