Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: bazzajunior on November 27, 2016, 05:25:49 AM

Title: Is there a way to ignore touch through a GUI button?
Post by: bazzajunior on November 27, 2016, 05:25:49 AM
I'm currently developing a 3D world game for Android which features a small tank within a scene. I have a working 'touch to move' system based on the Hutong Games tutorial video - https://www.youtube.com/watch?v=08VQPzDLNMk&index=9&list=PLD8AAC983AAD87D01 (https://www.youtube.com/watch?v=08VQPzDLNMk&index=9&list=PLD8AAC983AAD87D01).

The issue I'm having at the moment is that the tank moves great but when the user taps on one of the GUI elements (a button to fire a spawned missile) the tank moves/rotates to the screen position where the button resides.

I've tried using an 'Is Pointer Over GUI' to filter the touch (in both the TouchManager FSM and the GUI 'Fire' Button FSM) but it doesn't seem to work. I've also tried setting a 3D cube in front of the GUI button, parented to the camera, and putting a filter via the 'Touch Object Event' on it but due to the use of three cameras in the scene, this won't work as I'm not on the MainCamera anymore.

I have read a previous topic on this subject within the forum http://hutonggames.com/playmakerforum/index.php?topic=9705.0 (http://hutonggames.com/playmakerforum/index.php?topic=9705.0) but the outcome wasn't immediately obvious as to an end result  :-[

Does anyone have any ideas as to where I may be going wrong or may have come across a similar problem themselves?

Many thanks,


Barry
Running: Unity 5.3.5f1 and Playmaker 1.8.1