I have an object that I am constantly updating to be at the world position of the mouse, however when I add a collider, and set it to trigger, the object flies at the camera. It starts at the mouse position, then moves closer and closer to the camera along the ray cast. Any help would be appreciated
i think that’s because you hit it with your raycast
you should make a new layer for your object
if(Physics.Raycast(cam.transform.position, cam.transform.forward, out hit, range, layermask))
{
}```