Is the transformation matrix for entites have been changed? Cause with new A7 my newton car's visual proxy behaves different from the physical one. Seems it gets the roll and tilt angles wrong. Positions and pan are same at both.
EDIT: I tried it with also other physical objects, they behave same as the car.





PS: I use ventilator's Newton 1.53 wrapper and i posted the function below which gets the entity matrix from Newton and applies it to the entity.

Code:
void ent_setmatrix_rb(ENTITY *entity, float *m)
{
	float pan, tilt, roll;
	
	if(fabs(m[2]) > 0.9999) // looking straight up or down -> gimbal lock
	{
		pan = atan2(-m[4], m[5]); // -m[4]?
		tilt = 1.570796 * sign(m[2]);
		roll = 0;
	}
	else
	{
		pan = atan2(m[1], m[0]); // swap?
		tilt = asin(m[2]);
		roll = atan2(m[6], m[10]);
	}
	
	entity->pan = pan * RAD2DEG;
	entity->tilt = tilt * RAD2DEG;
	entity->roll = roll * RAD2DEG;
	
	entity->x = m[12] * METERTOQUANT;
	entity->y = m[13] * METERTOQUANT;
	entity->z = m[14] * METERTOQUANT;
}


Last edited by YNG; 04/30/09 11:49.