hi

Share your ZGE-development tips and techniques here!

Moderator: Moderators

Post Reply
User avatar
zakkwylde
Posts: 29
Joined: Sun Feb 24, 2008 1:38 am
Location: France

hi

Post by zakkwylde »

hi does anyone know how to allow mouse rotation to control limitless mouse look? currently i can move my mouse around to look but after 1 complete turn i cant move anymore. say i move left, once i face forward after a complete turn i cant turn left anymore. any ideas?
oh and how about right click and give a camera zoom. something like switching to sniper scope?
User avatar
Kjell
Posts: 1881
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi zakkwylde,

Use centerMouse() in a ZExpression to center the mouse, "}" as Key of a KeyPress Component for the Right Mouse Button, and lower the App.FOV property dynamically using a ZExpression to perform a zoom effect.

Good luck ~
K
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

watch the centerMouse useage,. .

Post by jph_wacheski »

here is a little example,. simplest implementations,. but should get you going,. one thing to be VERY carefull of, is using the (F9) play button as you can loose control of your mouse! it will re-center and you can only CtrAltDel to get out,. is there no key to end that ??? also I would only run anything with mouseCenter in fullscreen,. as if you click outside the window (easy to do when you cant see the pointer!) you will loose focus on the app and again the mouse will keep centering making ending things difficult!
Attachments
mouse_center_test.zgeproj
mouseCenter and simple ZOOM example,.
(1.34 KiB) Downloaded 547 times
iterationGAMES.com
User avatar
Kjell
Posts: 1881
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hej jph,

You can use Alt+Enter to Start / Stop :)

K
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

ah nice! thaks Kjell,. is there a keyboard shotrcuts list yet? I looked on the main page but did not see one listed,. although there are not many shortcut yet,. that I know about,. lol
iterationGAMES.com
User avatar
Kjell
Posts: 1881
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

By the way,

Here's a useful debug setup while working with centerMouse. It uses the Escape key to toggle Debug state as it's the only hard-coded key in executables & unused in the Editor.

K
Attachments
Debug.zgeproj
(991 Bytes) Downloaded 517 times
Post Reply