I am trying to do a RigidBody2D that you can grab with your mouse.
So far this has worked pretty good but when trying to hit other RigidBodies, it just seems to freak out and do nothing, the expected behavior would be for the RigidBody to get flinged.
Transform.Translate would be what you are looking for. Here is an example for how you would use it to make an object move towards your mouse:
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
public GameObject movableObject; // This is the object you want to move
private void FixedUpdate()
{
Vector3 mousePosition = Input.mousePosition; // This line grabs the raw mouse position
mousePosition = Camera.main.ScreenToWorldPoint(mousePosition); // This line converts the raw position into a position in the world space
movableObject.transform.Translate(mousePosition);
}
}