Skip to main content
gamedev.net
🔒 Locked

object .x position

Started by kevlur 0 replies 250+ views
Original Post
kevlur
kevlur
Hi, how can i change the position of the mesh after i have loaded it and before render it? where are stored the .x position and rotation vectors after loaded it? how can i change these before render the scene? Thanks Kev
hplus0603
hplus0603
You need to keep some kind of entity record, that stores position/orientation of the object, and then the mesh that represents the object graphically.

Then, to render your scene, you iterate over each entity, turn the position/orientation into transform matrices, and draw the respective meshes with these matrices.

In OpenGL, camera + object transform glom together into the MODELVIEW matris. In DirectX, these are separated into the WORLD and VIEW matrices.
enum Bool { True, False, FileNotFound };

Topic Locked

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

Sign in to reply to this topic.