playMaker

Author Topic: Mouse Pick point gives no coordinates  (Read 2611 times)

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Mouse Pick point gives no coordinates
« on: January 18, 2015, 10:40:58 AM »
[/url]
[/url]
[/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.
« Last Edit: January 18, 2015, 02:49:06 PM by VascBogdan »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mouse Pick point gives no coordinates
« Reply #1 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

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Re: Mouse Pick point gives no coordinates
« Reply #2 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 ?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Mouse Pick point gives no coordinates
« Reply #3 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.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D