Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: VascBogdan on January 18, 2015, 10:40:58 AM

Title: Mouse Pick point gives no coordinates
Post by: VascBogdan on January 18, 2015, 10:40:58 AM
(http://s4.postimg.org/qrdo6wcl9/error1.png)[/url]
(http://s4.postimg.org/f3jmccngd/error2.png)[/url]
(http://s4.postimg.org/l5r92ubwd/error3.png)[/url]

My object moves to 0;0;0. Why isn't clickedvector3 (Vector 3 variable) changing ? I tried to enable "every frame" but still not working properly.

The game is in 2D.
Title: Re: Mouse Pick point gives no coordinates
Post by: jeanfabre on January 19, 2015, 02:16:36 AM
Hi,

 Try to use the picked GameObject first ( moveTowards also use gameobject as target), then you'll be able to detect if indeed your mouse pick is working in your scene, cause if you don't get any result, it meanse your scene is not setup properly.

typically, camera problem or else, your gameobject is missing a collider, mousepick only works on object that have colliders.

 Bye,

 Jean
Title: Re: Mouse Pick point gives no coordinates
Post by: VascBogdan on January 19, 2015, 07:53:13 AM
Sorry but, I still don't understand. My MoveTowards action is not suposed to go to a GameObject target, but to a Vector 2.
The problem is the Mouse Pick, which doesn't give me any value of the clicked area.
Can you be more specified ?
Title: Re: Mouse Pick point gives no coordinates
Post by: Lane on January 19, 2015, 08:49:02 AM
you need to debug your Mouse Pick.

Is it hitting anything? Store the Hit Object and watch at runtime to confirm. If its null then its probably a layer issue, your objects are missing colliders or the distance is too short. If it is not null, then you can see exactly what was picked.

After you know its hitting something, store the hit point and go from there. Likely the problem is one of the above.