Page 1 of 1

First Person Camera (Alcscript)

PostPosted: Mon May 26, 2008 11:10 am
by boblishman
Ok guys ... I am at my wits end ... I have just spent 5 HOURS trying to do something (that I THOUGHT should be) really simple ... but I have had to try everything by "guesswork" as I can't find anything on here about how to set up a first person camera and the flags that are needed/used ...
(obviously I have found all the camera flags and setting HERE ... but there are no "instructions" or examples ... :roll: )

Obviously, the camera type is "firstperson" (even I could work that bit out) but it always points (or moves down to) the ground/through the mesh/through the objects/works in reverse/points at the sky/etc., etc., etc., ... but not what I want it to do ... :evil: I've tried a gazillion combinations of flags, settings, (even cameras!) ... bit I just can't get it ... :cry:

All I want to do is to switch to first person - because I want to use a keypad with buttons (mounted on a wall at head height) and there are no animations for it - so I simply want the game (upon entering the camera region) to switch to the (first person) camera and for the camera to be exactly where the avatars "eyes" are (exactly like what happens when you press F1) ... so I can then use the mouse to "look" at the keypad (and press the keypad buttons) ... and when I then walk away (and out of the region) we return to the "normal" avatar camera ...

Like I said, I've spent HOURS trying to get the camera alcscript to do this ... but to no avail ... :oops:

In a nutshell, I just want the region to "force" a "F1 key press" when entering (and leaving) the region ...

Maybe I am making it too complicated ... is there an easier way?

Any help would be VERY much apreciated ...

Can anyone come to my rescue? ...


*sobs into his frustration hanky* :?

Re: First Person Camera (Alcscript)

PostPosted: Mon May 26, 2008 12:46 pm
by Paradox
You definitely want the "maintainlos" flag, as that will keep it in the Line of Sight of the avatar. Check that you have POA set to a reasonable value, and that your accel and velocity values are 0 (if you don't want it to move).

Better yet, wait for someone who has used cameras to offer their feedback... :P

Re: First Person Camera (Alcscript)

PostPosted: Mon May 26, 2008 1:38 pm
by Nadnerb
Uhm.... I'm going to say... Ignore Paradox. Don't do either of those things. MaintainLOS will just cause the camera to avoid walls. That's none of our concern here really...

first, you can find some simple instructions on cameras here: http://guildofwriters.com/wiki/Updating_Ages#Region_.28Logic.29_Changes

Next, what you want to do is probably to set up an avatar camera with a POA of 0, 0, 6. That should put the camera right inside the avatar's head. However, I think it might be better in this situation to just make a fixed camera that stares at your keypad, and activate that. That way, the user doesn't have to actually look at the keypad, they're forced to. (sounds like what you want, if it's not, try the poa thing)

Re: First Person Camera (Alcscript)

PostPosted: Mon May 26, 2008 2:21 pm
by Trylon
A first person camera should work as well, but it needs a position of 0,0,6, and a reasonable POA (otherwise, it'll just point downward) Try POA:0,1,6 or POA:0,-1,6 (Can't remember if y should be reversed or not)

Re: First Person Camera (Alcscript)

PostPosted: Mon May 26, 2008 2:52 pm
by boblishman
Trylon wrote:A first person camera should work as well, but it needs a position of 0,0,6, and a reasonable POA ...


OK.... I've tried the POA's (hundreds of them) but I have no idea how to set a position ... what is the alcscipt for that ... - or is it co-ordinates in Blender . ? ( I can't find anything on position ? )

Re: First Person Camera (Alcscript)

PostPosted: Mon May 26, 2008 2:58 pm
by Trylon
the alcscript variable is <object>.camera.brain.offset, and it takes the same type of value as the poa setting.

Re: First Person Camera (Alcscript)

PostPosted: Mon May 26, 2008 4:45 pm
by boblishman
thanks guys ...

the final setting I went with were for a "firstperson" camera with
poa: 0,-0.5,6
offset: 0,0,6.1

thank you all ... *goes to bed VERY tired* ...

Re: First Person Camera (Alcscript)

PostPosted: Mon May 26, 2008 11:45 pm
by Grogyan
A little bit longer and I would have posted what I did for my 1st POV camera in my shell