playMaker

Author Topic: Store the game object when touched  (Read 3302 times)

semie

  • Playmaker Newbie
  • *
  • Posts: 21
Store the game object when touched
« on: March 22, 2015, 08:12:03 AM »
Hi all,
Just wondering how I go about storing the game object in a variable when I touch it using touch object event or touch event? or any of the other touch events.
I want to be able to do some compares on tags and objects etc.
Seems it should be super simple to me but I can't figure it out....
Cheers

wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
Re: Store the game object when touched
« Reply #1 on: March 22, 2015, 02:38:13 PM »
it's a multi-part process.

1 listen for a screen touch
2 get the touch coordinates in X Y
3 raycast into the scene to get the object
4 do stuff based on the object

probably lots of ways to do it, but try the action SCREEN PICK for step 3.

Hope that helps.  :)