playMaker

Author Topic: [FIXED] Find closest object with tag action returns wrong value for distance  (Read 3786 times)

pneill

  • Playmaker Newbie
  • *
  • Posts: 32
Pretty simple bug.  The Find closest object with tag action returns the sqrMagnitude instead of the actual distance.  Makes sense to use this as a way to determine what object is the closest, but it should then calculate and return the actual distance.

« Last Edit: July 02, 2012, 06:47:34 PM by Alex Chouls »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 Do you need an action that does that? I can provide the quick fix if you want. Laos I noticed that if you leab "untagged" then it doesn't work, where it should simply scan the hierarchy I would think.

 Bye,

 Jean

pneill

  • Playmaker Newbie
  • *
  • Posts: 32
No need for a quick fix.  I wrote my own.    :)

Just thought it might be something to fix in a future release.  Drove me nuts because I couldn't figure out why I kept getting different  answers between that action and the get distance action

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Yes,

 I get that quite often actually, the fact that an action script is hidden from the main workflow has this down side, I had this big time with the time scale action where I assumed it was just affecting the timeScale, but it also affect the fixDeltaTime, and I was reverting back the time scale by script, the result was a very very slow frame rate, like 3FPS, so I though something broke in my physic set up or a script was going mad... profiler was crashing, I could not find the source, until I had to take it down to pieces until I nailed it...

Bye,

 Jean