Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: pneill on May 20, 2012, 11:25:52 PM

Title: [FIXED] Find closest object with tag action returns wrong value for distance
Post by: pneill on May 20, 2012, 11:25:52 PM
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.

Title: Re: Find closest object with tag action returns wrong value for distance
Post by: jeanfabre on May 21, 2012, 01:38:33 AM
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
Title: Re: Find closest object with tag action returns wrong value for distance
Post by: pneill on May 21, 2012, 03:21:14 AM
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
Title: Re: Find closest object with tag action returns wrong value for distance
Post by: jeanfabre on May 21, 2012, 05:02:01 AM
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