playMaker

Author Topic: Mouse Pick Target Lock  (Read 1132 times)

san

  • Junior Playmaker
  • **
  • Posts: 93
Mouse Pick Target Lock
« on: September 29, 2020, 02:20:50 AM »
Hello again,
So I am working on touch screen and i want to setup auto lock on enemy with mouse pick. This is what i want to do:

- Finger touch on screen and player can look at the Finger direction. IF Finger keep holding and go over Enemy then Player AutoLock on Enemy or Finger tab on enemy then AutoLock.

So Far i already setup if Finger move anywhere on screen and Player look at the finger. When finger release Player can move around freely. (it is working)

In Mouse Pick - I store variable for Store Game Object. When finger press on Enemy, Send event to Player to Look at the Store Game Object from mouse Pick. It is working but does not work with if finger keep touching on screen and move around, the mouse pick event not updating everyframe.

So i am having problem with Everyframe on mouse pick for Autolock on Enemy or just do Finger can touch so player can aim anywhere on screen. Mouse Pick Everyframe doesn't work with Store Game Object. it is keep looking for new update on Enemy Game object or other object to look at.

Also i came up with this ideas but doesn't work somehow. I add a collider to Finger cube that make player is looking at/aim with Trigger enter event for Enemy. So when i Holding down cube and going over Enemy... that cube collider can send event to player in another Global State to do Mouse Pick with Store Game Object specifically. But seem cube is getting larger when i keep holding down on screen. I dont know why that happened but i am thinking Vector for set position for cube.

So anyone has done this or better solution to touch base on target lock on enemy, please let me know. Thanks
« Last Edit: September 29, 2020, 02:25:42 AM by san »