Mouse collision?


Are mouse cursor collisions possible? For a 2d game, I have a sprite following the mouse, but that object moves with the windows cursor, which cannot collide with anything in the game. Is it possible to confine that cursor-following object to the game world and collide? I don’t know how to approach this.


Fixed it. Was setting the transform position directly which negates physics. Use rigidbody.MovePosition(v3) instead.