PDA

View Full Version : creating a first person experience


student5ays
01-21-2009, 05:10 PM
Hello everyone. I have the keys w a s & d move the camera and i want the mouse to orient the camera, just like any first person game. My problem is that I can only get the camera to orient (with the event command) in a 360 horizontal circle, and thats after you hold the mouse down. I want it so you dont have to click to move it should move if you move the mouse anywhere. I also want to be able to look at the sky and ground. Can anyone please point me in the right direction? Thank you!

xViolatorx
01-21-2009, 06:57 PM
Oof, thats a tough one. There doesn't seem to be an option to recognize the "cursor" and allow it to control the camera. I will keep playing around and see if i can come up with something.

student5ays
01-22-2009, 12:30 AM
How difficult would it be for some carnegie mellon person to give the 'orient camera to mouse event' a few more options that allowed more interactivity? I am trying to find ways to code around it by orienting the camera to invisible models that are connected to the rotation of the camera, but i havent found anything solid yet.

Please let me know if anyone has an idea(s) on how to do this! :D

xViolatorx
01-22-2009, 08:08 AM
There is a post a few pages down, that has a "halo style camera" a2w post that works pretty good. It still cant move the camera up and down like it should but it is the closest I have seen for alice.

IcePaladin37
01-24-2009, 07:06 PM
Try this:

1. Add the events that let the mouse orient and move the camera.
2. Add 2 while a key is pressed events and set one event to the W key and one to the S key.
3. Then, on the event set to the W key, place a camera.turn method in the "during" box and make it turn backwards. Do the same for the other event, but make it go forward.
That should make the camera work for the mouse. And good luck on your fps :D

Ch0pStickS
01-25-2009, 10:29 PM
Actually i've had a method for this up for quite a while now

check this link out
http://www.alice.org/community/showthread.php?t=1931

It also has an older version that works differently, but is alot less laggy.

it can be found here:
http://www.alice.org/community/showthread.php?t=1305

EDIT:
BTW, please read the instructions first.

Ch0pStickS
01-25-2009, 10:46 PM
Oof, thats a tough one. There doesn't seem to be an option to recognize the "cursor" and allow it to control the camera. I will keep playing around and see if i can come up with something.

Yes there is, you just have to know where to look and how to use it

student5ays
02-03-2009, 10:36 PM
Hi ch0psticks,
your engine is great! do you know if there is a way to orient the mouse cursor's x and y to the center of the screen?

Ch0pStickS
02-04-2009, 12:35 AM
Well in the instructions i said how to "calibrate" it. Which is done I think by holding Enter and clicking on the cursor.

If you mean something else, please explain more

student5ays
02-11-2009, 05:33 PM
is there a way to LOCK the mouse cursor at the 0,0 origin AKA center of the screen?
Your code is great ch0psticks! I just want the mouse to STAY in the center of the screen. Is this possible?

Ch0pStickS
02-14-2009, 01:21 AM
yes actually, but can you tell me which one you are talking about? i posted 2 different ones