Playmaker Forum

PlayMaker Help & Tips => PlayMaker Tutorials => Topic started by: Alex Chouls on April 22, 2011, 03:14:00 AM

Title: Using Mouse Pick
Post by: Alex Chouls on April 22, 2011, 03:14:00 AM
Video tutorial showing how to use Mouse Pick: (720p recommended):

Title: Re: Using Mouse Pick
Post by: Grave_sts on January 12, 2012, 07:33:11 AM
Hey~

I implemented this to a character and, was curious as to how one would make the character move over a terrain for instance instead of just walking through it? (the character stays on one level ;<)

Thanks in advance
Title: Re: Using Mouse Pick
Post by: FractalCore on January 13, 2012, 07:08:41 AM
I had this same question a while ago when I first tried this tutorial, never got it working. But since then I've figured out more and more about Playmaker and now I have a way.

First, put a Character Controller on the character. Very important.

Then you want to use Controller Simple Move instead of Move Towards. And set it to move at maybe 50 Speed with 1 in Z and set to local space. This should move it forward in which ever direction it's pointing. And because of the Smooth Look At, it's forward direction is set towards the target sphere. And it should go up over obstacles (less than the characters slope limit allows)

But now that you're not using the Move Towards, you don't have a Finish Distance. To make up for that try adding a sphere collider to the target sphere and setting it to Trigger. Then add a new FSM to that which, when it gets a Trigger Enter event (Character colliding with it) will send a To Stop event to the Character. Which triggers the Global Transition to bring it back to the Idle State.

Hopefully the pictures will help explain. The first image is the new Target Sphere FSM and the second image is the modified Character FSM.
Title: Re: Using Mouse Pick
Post by: Grave_sts on January 27, 2012, 04:57:45 AM
Thanks~ :D

Title: Re: Using Mouse Pick
Post by: mr.erix1 on March 26, 2012, 02:58:10 AM
hi! i fallow to this tutorial and i can't find "broadcast event"  please help!
i hawe latest playmaker update.     

(http://img542.imageshack.us/img542/9923/broadcastevent.png) (http://imageshack.us/photo/my-images/542/broadcastevent.png/)

Uploaded with ImageShack.us (http://imageshack.us)
Title: Re: Using Mouse Pick
Post by: Alex Chouls on March 26, 2012, 08:06:16 AM
Broadcast Event Is now an option in the Send Event action under Event Target. You will also need to set any event you want to broadcast to be a global event by checking the checkbox next to its name.
Title: Re: Using Mouse Pick
Post by: mr.erix1 on March 26, 2012, 08:48:40 AM
than you werry much for your help:)
Title: Re: Using Mouse Pick
Post by: vaios76 on February 10, 2013, 06:41:17 AM
I picked playmaker for unity3d from the asset store  a couple of months ago and decided to use it this weekend. I watched the mouse pick tutorial and tested it successfully in a scene with a simple plane and two cubes with one of them as target. I decided to test on a terrain made from a heightmap in a unity scene (2048X25X2048) and I failed. What may be the reason? Thanks in advance.
Title: Re: Using Mouse Pick
Post by: kiriri on February 10, 2013, 06:46:59 AM
mouse pick and screen pick are fancy versions of raycasts. Raycasts can only collide with colliders (duh :D). Make sure your terrain has one. If that doesn't work, turn the distance setting in the action to something very high and see if that helps.
Title: Re: Using Mouse Pick
Post by: vaios76 on February 10, 2013, 10:52:40 AM
the terrain collider is on allright. Mouse pick works on a plane but I can't make it work on a unity terrain. I have set the distance very high (>5000) but nothing happens. I am using Unity 4.01 if that means something.
Title: Re: Using Mouse Pick
Post by: stevenuncle on February 11, 2013, 09:35:36 AM
Thanks~