MeshHelper.applyPosition error

Software: Away3D 4.x

Josh S., Newbie
Posted: 15 March 2013 02:52 PM   Total Posts: 2

Away3D 4.1

Am I doing it wrong or is it a bug?

var spikeGeometry:Geometry = new CylinderGeometry(0.1210041falsefalsetruetrue);
var 
spikeMesh:Mesh = new Mesh(spikeGeometryspikeMaterial);
MeshHelper.applyPosition(spikeMesh0, -500); 

TypeError: Error #1034: Type Coercion failed: cannot convert away3d.core.base::CompactSubGeometry@32cb821 to away3d.core.base.SubGeometry.
at away3d.tools.helpers::MeshHelper$/applyPosition() [MeshHelper.as:260]

subGeom SubGeometry(geometries[i]); 

 

   

John Brookes, Moderator
Posted: 15 March 2013 05:33 PM   Total Posts: 732   [ # 1 ]

Theres a few bugs to do with the way 4.1 uses compactSubgeometries and a few of the other classes that havent been updated for this.
4.1 is alpha

A work around is to convert the new 4.1 CompactSG to the old 4.0 SubG
eg

myMesh.geometry.convertToSeparateBuffers();
MeshHelper.applyPosition(myMesh0, -500); 
   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X