After recompiling the sdk w/ pspgum.c with my recommended changes to sceGumScale, it worked correctly. I believe that this is a bug in the sdk and needs to be fixed in the next build.
Thanks
[/edit]
Hey guys,
I am trying to make a rectangle out of a square polygon by scaling it differently in each axis. This works fine until I rotate my object about the Z-axis...then it becomes skewed. It is almost like the rotation after the scale is not rotating the scaling. (so it stretches the object always along the same global axes, no matter which way it is rotated...it should stretch along the object attached axes) Is there something I am not doing right? I have tried switching the order of the rotate/scale but that doesn't matter.
Code: Select all
v3z scale;
scale.glv.x = 20.0f;
scale.glv.y = 5.0f;
scale.glv.z = 1.0f;
sceGumScale( &scale.glv );
sceGumRotateZ( (float)val*PI/180.0f );
Code: Select all
void gumScale(ScePspFMatrix4* m, const ScePspFVector3* v)
{
float x,y,z;
x = v->x; y = v->y; z = v->z;
m->x.x *= x; m->x.y *= y; m->x.z *= z;
m->y.x *= x; m->y.y *= y; m->y.z *= z;
m->z.x *= x; m->z.y *= y; m->z.z *= z;
}
Code: Select all
void gumScale(ScePspFMatrix4* m, const ScePspFVector3* v)
{
float x,y,z;
x = v->x; y = v->y; z = v->z;
m->x.x *= x; m->x.y *= x; m->x.z *= x;
m->y.x *= y; m->y.y *= y; m->y.z *= y;
m->z.x *= z; m->z.y *= z; m->z.z *= z;
}
Any insight into my problem would be of great help!!! I'd rather scale a square than create a rectangle any day!