Linked Questions

0 votes
0 answers
56 views

Unity rigidbody glitch throu corners [duplicate]

No matter how thick the wall is, the player will glitch through. I've tried changing the settings on the rigidbody but nothing have worked. The walls fits together almost perfectly. Why is this ...
MBrain's user avatar
  • 75
0 votes
0 answers
26 views

How to prevent an object from moving beyond colliders? [duplicate]

I have an enemy object, and it needs to move around an arena. I also have four Wall gameObjects surrounding this arena, and both the enemy and walls have colliders (not set to isTrigger). This is how ...
IronWaffleMan's user avatar
0 votes
0 answers
22 views

My colliders keep going through one another? [duplicate]

So, I have some platform with colliders and a character with a collider (everything in 2D). The problem is, while there is some noticeable effects (a certain push back) when the colliders collide, ...
ManoTech's user avatar
  • 145
0 votes
0 answers
20 views

How do I stop my first person character going through walls? [duplicate]

As per my code: ...
SomeT's user avatar
  • 101
1 vote
2 answers
8k views

Move rigidbody using WASD keys but rotate it based on camera/mouse movement

I am very new to unity and my scripts are based on some scripts found on the web. I want to make a first person view so the camera is attached to my rigidbodys head. Then i want to move my rigidbody ...
MBrain's user avatar
  • 75
1 vote
1 answer
3k views

How to make sure an object NEVER passes through an edge collider (2D)?

In my top down perspective game, I have a ball that bounces off of walls. The ball should behave in a way where it will always bounce off in a 90 degree angle. The ball can only move up, down, left ...
noClue's user avatar
  • 1,309
0 votes
2 answers
2k views

Dragging a Rigidbody2D without passing through obstacles

I have this body of code written for an object that needs to be an obstacle and another object that is draggable. I have colliders on both and a kinematic rigidbody on the draggable object, but the ...
MContributor's user avatar
0 votes
1 answer
2k views

How to prevent a cube from falling through a plane in Unity

I am trying to prevent a player cube from falling through the plane (Battleground) in Unity, but after adding Mesh collider to both the cube and plane, as well as adding a rigidbody, nothing seems to ...
Wendy's user avatar
  • 3
0 votes
2 answers
463 views

In physics engines, what are the differences between moving an object with transform.translate and using RigidBody related functions like AddTorque?

I'm trying to recreate the ball maze puzzle game from Breath of the Wild with Unity. This is what I currently managed to make: As you can see, it's not nearly as smooth and I feel like I lack the ...
Sakamoto Alderson's user avatar
0 votes
2 answers
756 views

Rigidbody not working properly

I have two objects: a player and a wall. The player is passing through the long side of the wall but it collided with the short side of the wall. I want the player to collide with whole wall. Here is ...
shriram's user avatar
  • 11
1 vote
0 answers
888 views

No Collision while rotating. Object rotating with Rigidbody.Rotate passes through other collider

I'm working on a 3D game, and having issues with the colliders. My Cube Controller has movement input by keyboard, with collider and rigidbody components. Cylinder objects have basic colliders and ...
Sheath9's user avatar
  • 11
0 votes
1 answer
541 views

Tetris block kinematic rigidbodies pass through one another with Transform.Translate

I am trying to build a Tetris 3D game in Unity but I am stuck at getting the different blocks to interact (to detect each other, to sit one on top of the other rather than going through each other). I ...
mavish's user avatar
  • 151
0 votes
1 answer
330 views

Player goes through obstacles with colliders

My Player just goes through stuff he actually shouldnt be able to go trough like enemies or map borders, which all have collider components attached to them. It's really annoying because I haven't ...
Hammynator's user avatar
0 votes
0 answers
303 views

why are my 2d game objects passing through each other?

So I've been looking around for a while and can't seem to find an answer for this. I am trying to make a game where you stack shapes as high as possible. I have an OnMouseDrag script so I can grab a ...
Grant Scott's user avatar
0 votes
1 answer
263 views

I'm Dragging object by using touch (mobile) it doesn't stop when hit collider

I want to make object stopped when it hit collider of another object. But it doesn't stop. How can I fix this? - Unity my code is: ...
dogankirnaz's user avatar

15 30 50 per page