How to update a mesh position base on a pressed key?
Posted
by
steven166
on Game Development
See other posts from Game Development
or by steven166
Published on 2011-11-23T03:06:41Z
Indexed on
2011/11/23
10:12 UTC
Read the original article
Hit count: 177
directx9
I have a mesh loaded from a file, like a tiger mesh. At the first time it locates at A position, then if I press a left key, it will moves to B position but the problem is if I press a left key one more time, it will move from B position to C position. It means that the amount I want to move the mesh will base on the current position instead of the first time rendering position.
I can do it if I have a array vertices then I just update the vertex buffer, but a mesh loaded from a file does not have an array vertices, so how to do it?
Anybody help me, please?
© Game Development or respective owner