playMaker

Author Topic: Alternatives to Find Actions when I know where a Game O is?  (Read 1830 times)

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • Tumblr
Alternatives to Find Actions when I know where a Game O is?
« on: March 30, 2014, 09:39:02 PM »
I have a Game Object with a 2D collider. When it receives a touch input, it uses a Find Closest (with tag) to get a hold of the GO in its same world position and saves it as a varGO. Since I know where it is and don't need to "find" it, is there a more efficient way to get a hold of this object? - other than triggers, tried that and it's expensive for how many I need. Some kind of action like Get Game Object at Position (with tag)? That would be super useful since I want to limit Find Actions. Currently, I'm using it several times a second for various purposes. I'm not getting performance issues on my I7 PC with 12gRAM, but i'm worried about the effects it may have on phones. Just planning ahead. If you want me to come back when I actually have issues with phone testing, I will. Thanks for any ideas at all. :D

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Alternatives to Find Actions when I know where a Game O is?
« Reply #1 on: March 31, 2014, 12:25:53 PM »
Well, this might be what you need.

Get colliders in range. http://hutonggames.com/playmakerforum/index.php?topic=2304.msg10166#msg10166

or you can set the information before hand and collect it later depending on who sent it.

set event data https://hutonggames.fogbugz.com/default.asp?W531
and get event info. https://hutonggames.fogbugz.com/default.asp?W530

The one on top is great but it also deals with arrays which isn't as crazy as it looks!
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Alternatives to Find Actions when I know where a Game O is?
« Reply #2 on: March 31, 2014, 12:45:03 PM »
Really should test to see if it is indeed something you need to change before taking action.

You could use a ScreenToWorldPoint or something similar (im not very familiar with touch device stuff). Basically just raycast to the world point and grab whatever it hits. Very likely this would be cheaper, but its something you just need to test on your target device.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • Tumblr
Re: Alternatives to Find Actions when I know where a Game O is?
« Reply #3 on: April 01, 2014, 12:56:28 AM »
Okay, thanks guys, these are good options. I need to test more this week and update this thread when I try them out.