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 ...
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 ...
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 ...
209 views

### detect collision between two circles and sliding them on each other

I'm trying to detect collision between two circles like this: ...
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 ...
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 ...
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 ...
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 ...
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 ...