Hi everyone, and happy new year ! I'm workin on a flock behaviour using away3D,:
http://www.agence-anonyme.com/lab/treeflocking.html (This test is made of 500 plane, a wind vector (perlinnoise), a self behave comportement rule, and 1 simple colision rule. Working with real Object3D and no Flint like particle sprites). This help me to deal with 3D vectors and trig... but they are some stuff I can't understand...: 1 - Angle between two Object3D : in order to get it I'm doin this : leaf.position.normalize(1);//as dot product only works with normalized vector (as I now)... leafArr[j+1].position.normalize(1);//idem var angle:Number = leaf.position.dot(leafArr[j+1].position);//dot product I should return the cos of the angle and then use it to make my object rotate well, but this doesn't work : they are 3 dimensions of rotations and only one angle... Does anybody could help find a way to get my first mc to rotate in direction of the second (!!!!!!! Do not Use lookAt, I'm searching for a value)... 2 - Addin Number3D : It seems strange to me...each time i must add a number to another I have to create a new one to get the result, or doin it that way : mc.position.add(mc.position,number3D); In the API it's said that you can't but it seems that it's working... Am I right or aren't they other method to had a point to itself like : mc.position.add(number3D) ???? (I can use mc.position.x += number3D.x; But is it right ???). Well that's all for now...I hope I'm clear ! So if a Trig Master could help become Smarter ! I'm new to...Math. Sure i'll do a little Class and Tutorial about it in my (forComin') blog ! Thanks.
