Strange issue with Math.random()

Software: Away3D 4.x

bardo, Member
Posted: 08 March 2012 11:48 AM   Total Posts: 79

Hi all , im experimentig a bug , when usign Math.random in conjunction with away3d (even when im not using ANY proporties related to the framework).

First example : having a set of planes looking at (0,0,0) , then

var distance:Number Math.random()*10000000;
myContainer3d.moveBackward(distance); 

it result in a strange duplication of my plane ... i get 2 planes for every position i had at the start.

Even setting random duration for tweens :

var _duration=10000 Math.random();

_percent Quart.easeOut(tbc_duration); 

, result in the same strange error.

Any ideas?

Thanks!

   

bardo, Member
Posted: 08 March 2012 11:55 AM   Total Posts: 79   [ # 1 ]

i write a link to be more clear :

https://www.socialnetworkserver.it/wrball/

Thanks again!

   

bardo, Member
Posted: 09 March 2012 11:15 AM   Total Posts: 79   [ # 2 ]

srry alll ... im a noob : simply , some vertices result duplicate in vertex data : how to remove duplicates?

var vertices:Vector.<Number> = m.geometry.subGeometries[0].vertexData;
//INDICES:648   
var indices:Vector.<uint> = m.geometry.subGeometries[0].indexData;
//VERTICES:429 

Thnks!

   

bardo, Member
Posted: 09 March 2012 11:39 AM   Total Posts: 79   [ # 3 ]

is not so simple as working on array .... working on indices Vector , i ended to eliminate a lot of indices i actually need :

https://www.socialnetworkserver.it/wrball/


nobody have an ides?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X