| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| Mouse-Camera Movement; yes well hmm... | |
|---|---|
| Tweet Topic Started: Sep 15 2007, 02:24 PM (278 Views) | |
| LaserLemon | Sep 15 2007, 02:24 PM Post #1 |
![]()
Sir
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
This one, I find slightly tricky, but I'll try to explain it as thoroughly as possible, okay. The camera I'm using is in 3rd person and it follows my character, so far I've got this to run acceptably but it's not exactly working 100%, nevertheless, it follows my character but I want to make it possible to rotate the camera yourself by using the mouse. When you click and you keep pressing the button, moving the mouse rotates the camera, but how. What code should I use in the mouse keep pressed event?
|
![]() Formerly known as FaTaL_N00B. | |
![]() |
|
| Zip | Sep 15 2007, 06:04 PM Post #2 |
|
Forum Leader
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
This is simple: the camera object have 2 variables: rotatex and rotatey. Those variable defines the orientation respect to the 'follow' object rotx and roty. Sou if you want to rotate the view around the player you need that code:
You can improve that code so when the player moves the variables rotx_offset and roty_offset resets to 0. |
|
Sorry if i've made some errors, I'm not english! | |
![]() |
|
| LaserLemon | Sep 15 2007, 10:07 PM Post #3 |
![]()
Sir
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Can this be right, I mean, it IS a mouse button and isn't part of the keyboard. Doesn't this make more sense?
|
![]() Formerly known as FaTaL_N00B. | |
![]() |
|
| MysteriXYZ | Sep 15 2007, 10:21 PM Post #4 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
The state of the mouse buttons can't be checked by the regular mouse functions of Game Maker when is active, so keyboard_check_direct(...) has to be used. It may seem a bit strange, but it works ;).
|
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| Zip | Sep 16 2007, 12:52 AM Post #5 |
|
Forum Leader
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Holy words
|
|
Sorry if i've made some errors, I'm not english! | |
![]() |
|
| LaserLemon | Sep 16 2007, 03:52 AM Post #6 |
![]()
Sir
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Strange... I don't see any holes in them... LOL, Just Kidding.
|
![]() Formerly known as FaTaL_N00B. | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |






![]](http://z1.ifrm.com/static/1/pip_r.png)




Can this be right, I mean, it IS a mouse button and isn't part of the keyboard. Doesn't this make more sense?
is active, so keyboard_check_direct(...) has to be used. It may seem a bit strange, but it works ;).
LOL, Just Kidding.
2:35 AM Jul 11