Log in
Search
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.MOUSE controlled 3D games!
5 posters
:: Game Making :: Game Maker Help :: Game Dev. Q&A :: 3d game help
Page 1 of 1
MOUSE controlled 3D games!
My friend ZX at Yoyo, gave me this code. I use it on my NINTENDO WORLD DELUXE EDITION and on my XENO-WAR games.
This code will allow the player to look to the sides with the mouse.
//MOUSELOOK
z=0 //get display dimensions
display_w=display_get_width(); display_h=display_get_height();
//calculate motion
change_x=(display_mouse_get_x()-display_w/2)/16; change_y=(display_mouse_get_y()-display_h/2)/12;
//move cam
direction-=change_x
//set mouse back
display_mouse_set(display_w/2,display_h/2);
Hope this help u! (And that it works on ur 3D game ) L8R!
This code will allow the player to look to the sides with the mouse.
//MOUSELOOK
z=0 //get display dimensions
display_w=display_get_width(); display_h=display_get_height();
//calculate motion
change_x=(display_mouse_get_x()-display_w/2)/16; change_y=(display_mouse_get_y()-display_h/2)/12;
//move cam
direction-=change_x
//set mouse back
display_mouse_set(display_w/2,display_h/2);
Hope this help u! (And that it works on ur 3D game ) L8R!
Re: MOUSE controlled 3D games!
so exactly what does this do? mouse controlled view like in my elmaze game, but only left and right?
Re: MOUSE controlled 3D games!
I don't know the elmaze game...but yea, this only work 4 the X movement of the camera (direction)
Similar topics
» Point to mouse with lite.
» wich of these games do you own...
» Show us your games
» 2D or 3D Metroid Games
» Tasty Ham Games
» wich of these games do you own...
» Show us your games
» 2D or 3D Metroid Games
» Tasty Ham Games
:: Game Making :: Game Maker Help :: Game Dev. Q&A :: 3d game help
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|