EDIT: Its a top view 3D shooter.
Edited by antonrules, 30 August 2011 - 08:56 PM.
Posted 30 August 2011 - 12:08 AM
Edited by antonrules, 30 August 2011 - 08:56 PM.
Posted 30 August 2011 - 12:26 AM
Posted 30 August 2011 - 04:24 PM
Move, pressing the arrow keys will move it forward, backwards, left, and right. And it will face it's movement direction.do you mean like actually move??? or animated???
Posted 30 August 2011 - 04:26 PM
I already made several 2D games. And I'm not sure but I think that 3D movement requires "transformations"?Movement is up to you. When you draw the model with d3d_model_draw the arguments allow you to specify the x, y, z LOCATION of the object which can be used to calculate it's MOVEMENT. The object can also be rotated around the origin of its transform as well to animate it. But this appears too complicated for you atm, so I suggest you go back and learn allot more about how GM works in the 2nd dimension or if you are really bold take a crack at the 3D fps tutorial on the YYG's site here.
Posted 30 August 2011 - 04:32 PM
d3d_transform_set_identity(); d3d_transform_add_rotation_z(direction); d3d_transform_add_translation(x,y,z); //draw the 3D object here, make sure you draw it at (0,0,0) //example drawing a cube: d3d_draw_block(-8,-8,0,8,8,16,-1,1,1); d3d_transform_set_identity();
Posted 30 August 2011 - 06:30 PM
In your searches... how did you miss the pinned "FAQ - Recommended Topic List" at the top of this forum?I'm trying to learn how to make a basic 3D game. I have my camera set up and i can load external models. My question is, how do i make a D3D model move? I've searched hard but can't find any tutorials on the subject. Please help.
EDIT: Its a top view 3D shooter.
Posted 30 August 2011 - 06:33 PM
So basically it's the same as 2D.Movement is up to you. When you draw the model with d3d_model_draw the arguments allow you to specify the x, y, z LOCATION of the object which can be used to calculate it's MOVEMENT. The object can also be rotated around the origin of its transform as well to animate it. But this appears too complicated for you atm, so I suggest you go back and learn allot more about how GM works in the 2nd dimension or if you are really bold take a crack at the 3D fps tutorial on the YYG's site here.
Posted 30 August 2011 - 08:55 PM
Thanks, it got my model moving.You would only need transformations if you wanted the object to rotate. In what you described above you probably want something like this:
d3d_transform_set_identity(); d3d_transform_add_rotation_z(direction); d3d_transform_add_translation(x,y,z); //draw the 3D object here, make sure you draw it at (0,0,0) //example drawing a cube: d3d_draw_block(-8,-8,0,8,8,16,-1,1,1); d3d_transform_set_identity();
If you want to know how to actually change the x, y, and z when a user presses a keyboard key, then you should learn how to do that in 2D before trying it in 3D because it's pretty much exactly the same.
Posted 30 August 2011 - 09:10 PM
Thanks, it got my model moving.
0 members, 0 guests, 0 anonymous users