matrix - How do I rotate a ModelMesh around its own axis? -
I have a car model, body is different and 4 tires are different but they are in the same FBX file. I can rotate the car body and its work, but the tire does not rotate around its axis.
foreach (Basic effects effect in Carmel. [MI] [0] .Efects) {effect.EnableDefaultLighting (); Effect.World = change [carModel.Meshes [0] .Pierbone. Indexes] * carworld matrix; effect. Processing = camera Projection matrix; effect. View = camera. Visual matrix; } Carmemel. Table [0]. Draw (); FirstHeach (Basic Effects Effect in Carmodel. Table [1]. Effects) {effect.EnableDefaultLighting (); Effect.World = Conversion [carModel.Meshes [1] .Pierbone. Indexes] * tire matrix; effect. Processing = camera Projection matrix; effect. View = camera. Visual matrix; } Carmemel. Table [1]. Scare (); I'm just using the matrix to make the rotation. Crazy rotation Y (zodiac) How do I rotate the wheels on my axis? I am just testing 1 wheel, not all of these
I agree that your tire metrics is matrix. Curator rotation wai (amount) you have mentioned. If so, you should apply it to the mashhey's drawing: changes to effect.World = tireMatrix * [carModel.Meshes [1]. ParentBone.Index] * CarWorld;
Comments
Post a Comment