I am trying to have an object (sphere) move to the mouses location. I have looked at the Wobbley Rick Sanchez showcase and have made a node system which I thought would work, image below. When running the game, the object can be seen but then as soon as I move the mouse over the top, it disappears. I will attach the file via dropbox, really need help on this one.
you need to plug a "Screen to world space" node between the "Mouse Cords" and "Separate XYZ" node. You will probably need to move the resulting position a bit with the "Vector Math" node, since at least for me it is usually off by about -30 and +70.
Thats great, it is now moving but its a bit off which is I think what you mean by the -30 and +70. Is that -30 for the x and +70 for the y?
For me, this setup provided the best results. Don't know why I used "Set Transform" instead of "Set location", both should work the same in this case. Try out what works for you best!
That's so much better! Still ever so slightly off but I can mess with that. Only issue is that mine doesn't go up and down, only left and right?
In your first picture you used the "Mouse Cords"s Y and Z axis, but it only outputs X and Y. Maybe it is that?
I am now using the correct system based on your picture but still it is not working. I assume the mouse coordinates outputs the x and y but does the object move on the axis in reference to the blender axis so z for instance is straight up so I would want y to go into z?
if you want the object to move up, not forwards when you move you mouse upwards, yes.
Would it be possible for you to have a look at my blend file? I just dont know what im doing wrong
Looked at your .blend and I now think I got wrong what you were after. This setup moves the ball on Z and Y axis in front of the Player, fortunately it is way simpler than the previous one.
That is great thank you so much! Last question I promise, is there any way to decide how fast it moves, ie: slow it down a bit when moving?
Thanks again, so helpful!
just modify the value in the "Vector Math"-> multiply node, this would be something like a mouse sensitivity value.