Linked Questions

2
votes
5answers
1k views

How to “place” object in a 3d world without overlapping them ?

I would like to place object in a 3d world "like minecraft player can do". What I'm trying to do is to allow the user to place objects, without overlapping them (like in minecraft you can do). So ...
0
votes
2answers
1k 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 ...
0
votes
0answers
576 views

How to drag an object with mouse with collision?

I want to drag a GameObject with the mouse but I need collision. The basic mouse dragging code simply sets the position of the object to the hit.point with an ...
1
vote
1answer
209 views

detect collision between two circles and sliding them on each other

I'm trying to detect collision between two circles like this: ...
0
votes
1answer
136 views

In collision detection/resolution, what is a “collide and slide” algorithm?

Can anyone help me to better understand the concepts behind this algorithm? I've seen this phrase come up several times during my research into creating a 3D character controller, but am having issues ...
0
votes
1answer
172 views

Preventing overlap in OnCollisionEnter2D

So I have successfully built a script that can determine the physics for a ball reflecting linearly off of walls, similar to pong, while the ball is using a kinematic rigidbody. The issue is when the ...
1
vote
1answer
93 views

Subtracting magnitude from 2D circle contact

I'm trying to create an agar.io clone. In agar.io, each player can have multiple cells that "chase" the mouse pointer. The cells can also have multiple masses and the velocity is tied to the mass. The ...
0
votes
1answer
82 views

How to construct this collision vector?

I have a 3d game, but for movement I use only two axes (X and Z) - X is vertical, Z is horizontal Here's what I'm trying to achieve: Player is the circle, InputDirection is Blue, NewInputDirection ...
1
vote
2answers
78 views

Resolving collisions after initial collision

Given a sweep test for a ray, how do we check collisions after the 1st collision has been detected, and the ray has been deflected. Physics system steps are: Update velocities (gravity, etc) Resolve ...
0
votes
0answers
33 views

How to perform a sliding collision between a square and a circle?

Please point me to the duplicate if this has been asked before. I couldn't find it. Basically, I am creating a 2d top-down game where the player is represented by a circle, and the tiles are ...
1
vote
0answers
25 views

How to prevent Dynamic Rigidbody2d with large mass pushing another Rigidbody2d into BoxCollider2D

I'm making a prototype for a game idea but hitting a problem :( Quite new to Unity and feel like this should be relatively easy to solve, but keep going around in circles, and hoping to get some help :...