|
I know there's a simple answer to this I'm just not seeing. I've got a cube that I want to appear right behind the mouse cursor, constrained to the Z-plane (i.e. z=0). It'd basically be a 3D-rendered mouse pointer. What's the right way to do this? I thought Camera.main.ScreenToWorldPoint(Input.mousePosition) would be key, but that gives me the same coordinates no matter where the mouse is.
(comments are locked)
|
|
Here's my shot:
Note: This will only move the cursor on the X and Y coordinates. It does not take into account anything else. You'll want to create a second camera to render only this cube. Make sure it's not rotated at all, and is located close to the cursor. You'll also want to play around with the initial speed values to get them just right. Good luck, hope this helps somehow. :) I don't think this will keep the mouse right under the cursor (even if I get it calibrated perfectly on one computer, I imagine it might get different results on a second), but it's probably the best way to solve this problem. Thanks a bunch!
Apr 01 '11 at 10:47 PM
Capt_Swayworn
That's true. If it works for you, would you mind accepting and upvoting my answer so that other users can find this solution easier? Thanks,
Apr 01 '11 at 11:08 PM
e.bonneville
This is probably going to work for me, I'm looking for a Space Runner look. Hopefully I'm on the right track :) I'd upvote your answer if I could.
May 07 '12 at 06:14 PM
moonpix
(comments are locked)
|
|
I don't think this will keep the mouse right under the cursor (even if I get it calibrated perfectly on one computer, I imagine it might get different results on a second), but it's probably the best way to solve this problem. Thanks a bunch!
(comments are locked)
|
