How do I create a camera?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Cyberdemon531
Posts: 192
Joined: Tue Aug 24, 2010 11:01 am
Location: Tower of Babel

How do I create a camera?

Post by Cyberdemon531 »

Like have a switch that opens a door, and a camera next to it to show what opens? Could someone fill me in?
User avatar
lukas
Posts: 586
Joined: Sun Apr 04, 2010 10:37 am
Location: Belgrade, Serbia

Re: How do I create a camera?

Post by lukas »

I have been told that these tutorials are a bit outdated however the 'cameras' section of http://zdoom.org/zdkb has helped me when I started working with Zdoom.
User avatar
Cyberdemon531
Posts: 192
Joined: Tue Aug 24, 2010 11:01 am
Location: Tower of Babel

Re: How do I create a camera?

Post by Cyberdemon531 »

Uhhh... I still don't get it. :D
User avatar
lukas
Posts: 586
Joined: Sun Apr 04, 2010 10:37 am
Location: Belgrade, Serbia

Re: How do I create a camera?

Post by lukas »

First you put the camera object on your map (for example the Security Camera object), you set the three parameters in your editor
Camera tutorial wrote: 1. pitch: pitch of camera in degrees, 0 is straight ahead, 1-89 is down, and 166-255 is up (angle subtracted from 256).
2. degrees pan: number of degrees camera will rotate in either direction from its original orientation.
3. time to cycle: number of octics to complete one cycle of turning.
Then when you assign the camera object a unique Thing ID
And when you want the camera to be activated you use http://zdoom.org/wiki/ChangeCamera function in your ACS script (you know ACS, right? If not take a look at some general ACS tutorials first)
User avatar
Cyberdemon531
Posts: 192
Joined: Tue Aug 24, 2010 11:01 am
Location: Tower of Babel

Re: How do I create a camera?

Post by Cyberdemon531 »

Um. That changes the whole screen, right? I wanted a camera that's on a texture next to said switch..
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: How do I create a camera?

Post by XutaWoo »

Here you go, then.

Just a warning: for some reason, camtexs murder some people over at Skulltag. Of course, if you're not planning on a mostly multiplayer thing, this doesn't really matter.
User avatar
Cyberdemon531
Posts: 192
Joined: Tue Aug 24, 2010 11:01 am
Location: Tower of Babel

Re: How do I create a camera?

Post by Cyberdemon531 »

Is there a way to do it without ANIMDEFs? Because I don't understan ANIMDEFs at all!
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: How do I create a camera?

Post by InsanityBringer »

no, unless you want to switch the entire view to the camera, which is commonly considered annoying.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: How do I create a camera?

Post by XutaWoo »

You might want to, y'know, read the page.

It tells you exactly how to set up a camtex with ANIMDEFS.
User avatar
lukas
Posts: 586
Joined: Sun Apr 04, 2010 10:37 am
Location: Belgrade, Serbia

Re: How do I create a camera?

Post by lukas »

Um. That changes the whole screen, right? I wanted a camera that's on a texture next to said switch..
Ah, I understood you wrong. In that case, try XutaWoo's link - it's not at all hard to do.
User avatar
Cronyne
Posts: 39
Joined: Sun Dec 06, 2009 3:56 pm

Re: How do I create a camera?

Post by Cronyne »

Just something to add.

When you make your camtexture, you might wanna define it to be a 4:3 ratio. If the texture is a square, it'll look stretched vertically. 4:3 ratios are 64x48, 32x24, 128x96, etc, rather than a square 64x64.

The reason for this is that... well computer monitors are a rectangle too. So if you force the image to fit inside a square, the picture will stretch vertically, noticably. If it's a 4:3 rectangle, it should be perfect.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How do I create a camera?

Post by Gez »

Manhunt21 wrote:Is there a way to do it without ANIMDEFs?
No.
Manhunt21 wrote:Because I don't understan ANIMDEFs at all!
Too bad for you then.
User avatar
Nightfall
Posts: 555
Joined: Thu Aug 06, 2009 4:00 am
Location: Finland

Re: How do I create a camera?

Post by Nightfall »

What you first need to know is the resolution of your camera. As Cronyne said, 4:3 ratio is a good idea 128x96 pixels for instance). Then, you define a camera texture in ANIMDEFS with

Code: Select all

CAMERATEXTURE <cameratexture> <width> <height>
, in which <cameratexture> is the name of the cameratexture you're defining. It's arbitrary. In this case, it'd be "CAMERATEXTURE CAMTEX1 128 96".

Next, you'd make the camera sector by probably recessing it in a wall, the area being 96 in height and 128 in width (in this case again). The recess texture then naturally is the cameratexture, "CAMTEX1" in this case. And finally, you'd have an OPEN script, which would call SetCameraToTexture to attach the camera thing to the texture.

Hope this helps.
Locked

Return to “Editing (Archive)”