Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: coffeeANDsoda on August 06, 2014, 03:34:23 AM

Title: Custom 3D cursors in Playmaker
Post by: coffeeANDsoda on August 06, 2014, 03:34:23 AM
How would I make full 3d object with a FSM function as a cursor?
Title: Re: Custom 3D cursors in Playmaker
Post by: redikann on August 06, 2014, 10:37:44 AM
I believe Unity lets you place an image for the cursor in the build settings. Why not put an empty png to mask the cursor then parent an object to the center of the camera.
Title: Re: Custom 3D cursors in Playmaker
Post by: Lane on August 06, 2014, 11:42:44 AM
I think I'm doing something with Get Mouse Position, Screen To World Point and a raycast.

That should get you started.
Title: Re: Custom 3D cursors in Playmaker
Post by: coffeeANDsoda on August 06, 2014, 03:01:17 PM
I think I'm doing something with Get Mouse Position, Screen To World Point and a raycast.

That should get you started.

Get Mouse position doesn't show up when I search for it.
Title: Re: Custom 3D cursors in Playmaker
Post by: redikann on August 06, 2014, 04:34:07 PM
Title: Re: Custom 3D cursors in Playmaker
Post by: Lane on August 06, 2014, 04:48:32 PM
I think I'm doing something with Get Mouse Position, Screen To World Point and a raycast.

That should get you started.

Get Mouse position doesn't show up when I search for it.


It's on ecosystem and the forum. Would find the link but I'm on mobile at the airport right now..
Title: Re: Custom 3D cursors in Playmaker
Post by: 600 on August 06, 2014, 05:07:03 PM
Hello,
Try "Mouse Pick" from Action browser,
use Point vector3 for 3d object position.
Title: Re: Custom 3D cursors in Playmaker
Post by: coffeeANDsoda on August 06, 2014, 05:12:17 PM
Hello,
Try "Mouse Pick" from Action browser,
use Point vector3 for 3d object position.

As the first action in the first state? Or do I use it along with Get Mouse Button Down?

Plus for the second state, I have Get Mouse Y and X set up with mouse variables  and move x and y variables with a "Set Position" state. 
Title: Re: Custom 3D cursors in Playmaker
Post by: Lane on August 06, 2014, 05:52:50 PM
If you are actively making a mouse in world space you should do it all in one state.

I approached it with the idea of 1. Get the mouse position on the screen, 2. Convert that to world space, 3. Raycast from the camera to that point in world space, 4. Store the point it hits, 5. Set the position of the 3d mouse object there.

That's all done in one state every frame. That was my approach.
Title: Re: Custom 3D cursors in Playmaker
Post by: coffeeANDsoda on August 06, 2014, 06:14:53 PM
If you are actively making a mouse in world space you should do it all in one state.

I approached it with the idea of 1. Get the mouse position on the screen, 2. Convert that to world space, 3. Raycast from the camera to that point in world space, 4. Store the point it hits, 5. Set the position of the 3d mouse object there.

That's all done in one state every frame. That was my approach.

How could I do that when I can't find a thread or playmaker documentation search on get mouse position? Plus how would that translate to the options I get with the raycast action?
Title: Re: Custom 3D cursors in Playmaker
Post by: Lane on August 11, 2014, 11:14:24 AM
Try this, it's pretty basic.