playMaker

Author Topic: Averaging with ArrayMaker  (Read 2826 times)

troubleMaker

  • Playmaker Newbie
  • *
  • Posts: 25
Averaging with ArrayMaker
« on: April 06, 2014, 08:35:09 AM »
Hi,

I need to average some Y-rotations from a gameObject. I managed to read the rotations, store them as floats in an ArrayMaker list, but now i have the trouble of how can i get them out of there as a sum and average them. I thought of using the Array List Get Next- action, but if i have like 100 values stored it will take - as far i understand - 100 frames to get them added together which is not good. So any way to add all the values together in a single frame?

Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Averaging with ArrayMaker
« Reply #1 on: April 07, 2014, 06:57:07 AM »
Hi,

 That would definitly be a very nice set of new actions, to perform mathematical operations on a whole array, stats as well ( median, and all these stats stuff).

 I have added that to the to dos:

https://trello.com/c/FamlVQBD/31-arraymaker-update

Bye,

 Jean

troubleMaker

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Averaging with ArrayMaker
« Reply #2 on: April 07, 2014, 06:50:21 PM »
Ok, thanks a lot, Jean!

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: Averaging with ArrayMaker
« Reply #3 on: April 08, 2014, 04:23:52 AM »
Why would that take 100 frames ?
Each state isn't supposed to take one frame, isn't it ?
Visit my portfolio: http://www.yanivcahoua.com/

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Averaging with ArrayMaker
« Reply #4 on: April 08, 2014, 06:56:44 AM »
Hi,

 Indeed it will only take less than one frame ( if none of the state involve have a next frame event or other similar behaviors).

Still, it will be more efficient ( from a practical point of view) to have an action for this anyway.

bye,

 Jean

troubleMaker

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Averaging with ArrayMaker
« Reply #5 on: April 09, 2014, 08:44:45 AM »
Ok,

Thanks for clearing that up, it seems i had quite a misunderstanding of the way that the states and Playmaker work.

MS80

  • Junior Playmaker
  • **
  • Posts: 64
Re: Averaging with ArrayMaker
« Reply #6 on: April 25, 2014, 07:58:12 PM »
First off all I have to confirm how great and useful Playmaker is! I use playmaker for a few days now and it opens so many doors in Unity (coming over from Quest3D)!

I just found out that there is this wonderful addon "arraymaker" which is really great! I did not make any tutorials, just imported the package => after few minutes I had my first array: creating random numbers, add these numbers (like Yanifska suggested) and create a  average from them....just great!

Thanks for creating arraymaker! Playmaker is one the best assets out there!!


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Averaging with ArrayMaker
« Reply #7 on: April 28, 2014, 09:04:26 AM »
Hi,

Thanks for the feedback, You are welcome! ArrayMaker is indeed something important/mandatory in your set of tools to achieve complex projects with PlayMaker.

Bye,

 Jean