steve3d Posted August 26, 2011 Posted August 26, 2011 I've reported a bug here https://developer.unigine.com/forum/topic/666-objectwatermesh-reflection-bug/, and frustum said don't use scale on WorldLight, I'm absolutely sure that I never set the scale on worldLight, the scale was random, try this in double precision engine: load the world from above post select lightword object, and click x icon besides the scale value, reset scale to one, save the world reload the world, the z-scale value still not 1, it will become a random value(everytime reset scale and reload get different value) it seems this bug only happened when load old world, if create a new world, add a lightworld, this will not happen. it also happened when add NodeDummy into the old world, only z-scale get's random value.
frustum Posted August 26, 2011 Posted August 26, 2011 Thanks. The patch is: source/engine/world/Editor.cpp:952 int Editor::saveTransform(Xml *xml,const Mat4 &transform) const { #ifdef USE_DOUBLE double data[16]; data[0] = transform.m00; data[4] = transform.m01; data[8] = transform.m02; data[12] = transform.m03; data[1] = transform.m10; data[5] = transform.m11; data[9] = transform.m12; data[13] = transform.m13; data[2] = transform.m20; data[6] = transform.m21; data[10] = transform.m22; data[14] = transform.m23; data[3] = 0.0; data[7] = 0.0; data[11] = 0.0; data[15] = 1.0; return xml->setDoubleArrayData(data,16); #else return xml->setFloatArrayData(transform,16); #endif }
Recommended Posts