The part seems to not go the same direction as the mouse’s position, and what’s interesting, if I try another way to find the direction of the mouse other than .unit, for instance the .UnitRay property of Mouse, that one works fine.
The Hit CFrame will change if the mouse “hits” something, and thus is not going to necessarily represent a perfect orbital pattern around the camera. It’s going to cause weird issues. Plus, you need to offset your part’s position based on the camera’s position too. Without doing so, it will appear to orbit around the point of origin (0, 0, 0).
Therefore, it’s much better to just get the mouse’s UnitRay as you did in your second example, because it is not going to be affected by objects in the scene.
To demonstrate: Your first example is kind of “fixed” if you offset from the camera’s position:
However, if you point your mouse at the baseplate, you will notice it get all weird. It will only work if you point your mouse at the sky. Again, this is because the mouse’s raycasting has been obstructed and is returning the position of the obstruction as the Hit property. Not good for what you’re trying to do.
Thanks for the answer! I think I got it, I will cover this and I’m also probably going to show how to do this in multiple ways such as messing the the camera’s cframe as you tried
Hay crazyman sorry for interrupting again but I also was going to ask what is the camera’s postion origin, or is it like global and it acts up like an origin?