| 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: |
| camera movement | |
|---|---|
| Tweet Topic Started: Apr 8 2009, 02:57 PM (325 Views) | |
| zelda4evr | Apr 8 2009, 02:57 PM Post #1 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
i am currently using this to toggle camera movement with mouse:
this "snaps" the camera to where the mouse is, and then puts the mouse in the middle until you let go. i need it to do the opposite, i need it to when you right click you have to drag to move it, also the mouse should not go to the middle(a WoW style camera i guess) |
![]() | |
![]() |
|
| MysteriXYZ | Apr 8 2009, 05:26 PM Post #2 |
|
Master Matrix Masher
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Add this to the camera Create Event:
The following goes into the camera Step Event: Just adapt the above to your code and it should work fine. |
| U3D is like candy; after extensive consumption, it's Best to brush. | |
![]() |
|
| zelda4evr | Apr 9 2009, 02:29 AM Post #3 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
thanks, but its very jumpy, when it moves it jumps around sparatically |
![]() | |
![]() |
|
| skarik | Apr 9 2009, 02:32 AM Post #4 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
If that happens on your machine, then you'll probably want to use the window functions to get and set the mouse position to what ever. Another way is to keep the cursor in the center of the screen, and have the movement of the cursor instead add to a fake mouse_x and mouse_y . That WILL work on every machine. |
| Blog|EHS | |
![]() |
|
| zelda4evr | Apr 9 2009, 02:46 AM Post #5 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
i need the mouse to be able to move freely because i need an advanced gui, how is the first method done? |
![]() | |
![]() |
|
| skarik | Apr 9 2009, 02:54 AM Post #6 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Simply, it isn't. You can fake a mouse, as I said.
See? |
| Blog|EHS | |
![]() |
|
| zelda4evr | Apr 9 2009, 03:24 AM Post #7 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
kind of, im not really understanding it though, i understand it, but i don't get how it works enough to make my own. ugh...cameras... |
![]() | |
![]() |
|
| skarik | Apr 9 2009, 04:09 AM Post #8 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Imagine that Windows normally does that code for you. It measures the mouse movement, and adds that measurement to the mouse position. Here, we sorta override that: we're instead taking the mouse movement measurement 'directly' from the mouse. We must supply the mouse ourselves. |
| Blog|EHS | |
![]() |
|
| zelda4evr | Apr 9 2009, 04:59 AM Post #9 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
i see...i still have no idea how to code this maybe ill just ditch mouse+camera
|
![]() | |
![]() |
|
| skarik | Apr 9 2009, 05:15 AM Post #10 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I say try it. The more effort, the more proud you feel, even if it's crap. |
| Blog|EHS | |
![]() |
|
| zelda4evr | Apr 9 2009, 05:22 AM Post #11 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
ya but this is something that i plan on releasing within the next few days, and i need to solve my problems asap, and it has to be as polished as possible |
![]() | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |





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




maybe ill just ditch mouse+camera
10:21 AM Jul 11