It looks like you're new here. If you want to get involved, click one of these buttons!
I have this 3D game I'm developing
In this game I am a roll of toilet paper
If I press space, I get yeeted towards the cursor
I started using raycasts to do this, but that didn't work out, AT ALL
So, how do I get the toilet paper to jump towards the cursor? (how do I get the direction for where the cursor is)
You do not HAVE to use raycast. If you wanted the position of the cursor as it would be project to the scene from the camera, then yes, you would need raycast, but just to get a relative direction, you dont.
See my answer to your original question for the explanation.
Answers
use Input.MousePosition
to shoot out the raycast from
I said raycasts didn't work
And people told me not to use raycasts
So what can i do without raycasts?
@Dreek16designer
Well you have to use a ray, otherwise you can‘t tell your GameOject where where it should go.
Look in this video at 3:13
Use a raycast, and get the position where you want to go.
Just shoot a raycast from the mouse position, and record its hit position. Then, you can move your player towards that point.
You're going to have to raycast for this, there isnt another way that is in any way elegant.
Also, raycasts do work. You just did not set it up, or script it properly. Raycasts are exactly what you need for a situation like this.