Draggable object with 2d physics !!

Hi, I’m really in a problem, I want to make an object follow the mouse or touch (especially the touch) and make it react and collide with other objects, I have tried all kind of stuff and searched for a long time, but no positive results.
I would be very thankful if I got an explained solution.

Bump

Bump !

Is your problem that moving the object using Unity’s new 2D Physics functionality fails to make other components react to it? I believe I read recently that it’s missing the commands that the 3D Physics have and it’s not possible to control it that way.

Obviously, that sucks. It’s unknown if they’ll fix it.

If I were you, I’d simply rewrite with 3D physics locked to an axis, and call it a day.

1 Like

have you tried Rigidbody2D.MovePosition( Vector position ); http://docs.unity3d.com/ScriptReference/Rigidbody2D.MovePosition.html

1 Like

Thank you element_wsc ! it’s working very well !
@wccrawford it looks like a new feature they added ^^
(if you want to see how I did it just tell me)