   Coord Transformation problem
  Hi,i have some trouble with transformation coordit's in shadow volume case, i have an objet in my world with position and rotationi have a light point to générate the shadow volume (it work good)i can modify the position of my objet, it's ok for shadow, i can too made Y rotation, it's ok again but i can't make X and Z rotationi do this to have light position with my objectvecLight = lightpos;vecLight -= lo.Position;vecLight.TransformCoordinate(Matrix.RotationX(Geometry.DegreeToRadian(-lo.Rotation.X)) * Matrix.RotationY(Geometry.DegreeToRadian(-lo.Rotation.Y)) * Matrix.RotationZ(Geometry.DegreeToRadian(-lo.Rotation.Z)));lo.MakeShadowVolume(vecLight);i annulate the deplacement and the rotation (like the object is the center of the world to have light position) it's work good but X and Z not work :sother think to know, the light vector will be modified after like this :public void MakeShadowVolume(Vector3 lightpos){if (!ombreRefaire) return;//Matrix mat = Matrix.RotationAxis(new Vector3(1,0,0),Geometry.DegreeToRadian(Rotation.X)) * Matrix.RotationAxis(new Vector3(0,1,0),Geometry.DegreeToRadian(Rotation.Y)) * Matrix.RotationAxis(new Vector3(0,0,1),Geometry.DegreeToRadian(Rotation.Z)) * Matrix.Translation(Position);Vector3 lightVector = Vector3.Normalize( -lightpos );ombre.BuildFromMesh(ox.OXMesh, lightVector, Matrix.Identity);ombreRefaire = false;}and at the end, the vector is modified like :public void BuildFromMesh(Mesh mesh, Vector3 lightVector, Matrix rotationTransform){// transform light vertor by inverse rotation transform used for the shadow volume & the shading meshVector4 tlv = Vector3.Transform( lightVector, Matrix.Invert(rotationTransform) );lightVector = new Vector3( tlv.X, tlv.Y, tlv.Z );...pictures to see the problem with comments :http://tech.daaboo.net/images/060615-p-0.jpghttp://tech.daaboo.net/images/060615-p-1.jpghttp://tech.daaboo.net/images/060615-p-2.jpghttp://tech.daaboo.net/images/060615-b-0.jpghttp://tech.daaboo.net/images/060615-b-1.jpghttp://tech.daaboo.net/images/060615-b-2.jpgcan you help me please ?thanks a lotKillan[Edited by - killan on June 16, 2006 12:30:03 PM]
  i have make some analyse and testif only one axis of rotation is defined : it's ok for the shadowbut if more than one are defined : shadow move anormallymaybe it's my formula that's not correcte ? (see previous post)   ;  solution, axes order is important too... so simply but so important... grrrlightposc.TransformCoordinate(Matrix.RotationZ(Geometry.DegreeToRadian(-Rotation.Z)) * Matrix.RotationY(Geometry.DegreeToRadian(-Rotation.Y)) * Matrix.RotationX(Geometry.DegreeToRadian(-Rotation.X)));   