Skip to main content
GameDev.net gamedev.net
🔒 Locked

Simple question about matrices

Started by nini Aug 9, 2006 at 2:06 AM 2 replies 900+ views
Original Post
nini
nini
hi all , i've a car mesh with independent tire meshes , i want the tire to rotate around their center , what matrix should i use for a rotation around the center of an object ? thanx for all in advance.
DanielH
DanielH
http://www.google.com/search?hl=sv&rls=HPNW,HPNW:2006-14,HPNW:en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=arbitrary+axis+rotation+matrix&spell=1

Perhaps that can help you? Just rotate the tires around the up-vector of your car.
nini
nini
no this didn't help me ...
i want the tire to rotate like when a car is moving , around the X axis located at the center of the wheel
i don't know how to build this matrix

Anyone ?
Zakwayda
Zakwayda
Typically the tire would be modelled in local space, and rotation would occur about the appropriate cardinal axis. The tire would then be translated to the appropriate position relative to the local space of the car, and then transformed by the car's own transform matrix to position and orient it correctly in world space.

The details depend on the API. For example, in OpenGL you would most likely use glPushMatrix(), glPopMatrix(), glRotate*(), and glTranslate*() to achieve this.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.