Look like instance orientation was wrong.

This commit is contained in:
vlj 2014-03-27 01:33:02 +01:00
parent b384716cc4
commit 3538fd46d2

View File

@ -16,12 +16,12 @@ out vec2 uv;
mat4 getWorldMatrix(vec3 origin, vec3 rotation) mat4 getWorldMatrix(vec3 origin, vec3 rotation)
{ {
// from irrlicht // from irrlicht
float cr = cos( rotation.x ); float cr = cos( rotation.z );
float sr = sin( rotation.x ); float sr = sin( rotation.z );
float cp = cos( rotation.y ); float cp = cos( rotation.x );
float sp = sin( rotation.y ); float sp = sin( rotation.x );
float cy = cos( rotation.z ); float cy = cos( rotation.y );
float sy = sin( rotation.z ); float sy = sin( rotation.y );
float srsp = sr*sp; float srsp = sr*sp;
float crsp = cr*sp; float crsp = cr*sp;