Jump to content

[SOLVED] Assert error when call ObjectMeshSkinned.addMeshSurface(*) function


photo

Recommended Posts

Hi,

 

i get this assert: 19:12:18 D:\BuildAgent\work\696fe9aaffc3ca80\Unigine\source\engine\utils\Vector.h:192: Assertion: '(unsigned int)index < (unsigned int)length && "Vector::operator[](): bad index"'

on line "newBody.addMeshSurface(0, mesh, i);".

Code example:

	void addToOneSurface(ObjectMeshSkinned equiped[], ObjectMeshSkinned newBody) {
		// ignore main body
		forloop(int j = 1; equiped.size()) {
			ObjectMeshSkinned mesh = equiped.get(j);
			forloop(int i = 0; mesh.getNumSurfaces()) {
				newBody.addMeshSurface(0, mesh, i);
				mesh.setEnabled(0, i);
			}
		}
	}

It add surfaces from mesh to first surface of newBody mesh.

 

It in Unigine 2.0.

 

Thanks

Honya

Link to comment
×
×
  • Create New...