How do I create a camera?
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.
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.
- Cyberdemon531
- Posts: 192
- Joined: Tue Aug 24, 2010 11:01 am
- Location: Tower of Babel
How do I create a camera?
Like have a switch that opens a door, and a camera next to it to show what opens? Could someone fill me in?
Re: How do I create a camera?
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.
- Cyberdemon531
- Posts: 192
- Joined: Tue Aug 24, 2010 11:01 am
- Location: Tower of Babel
Re: How do I create a camera?
Uhhh... I still don't get it. 

Re: How do I create a camera?
First you put the camera object on your map (for example the Security Camera object), you set the three parameters in your editor
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)
Then when you assign the camera object a unique Thing IDCamera 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.
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)
- Cyberdemon531
- Posts: 192
- Joined: Tue Aug 24, 2010 11:01 am
- Location: Tower of Babel
Re: How do I create a camera?
Um. That changes the whole screen, right? I wanted a camera that's on a texture next to said switch..
- 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?
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.
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.
- Cyberdemon531
- Posts: 192
- Joined: Tue Aug 24, 2010 11:01 am
- Location: Tower of Babel
Re: How do I create a camera?
Is there a way to do it without ANIMDEFs? Because I don't understan ANIMDEFs at all!
- InsanityBringer
- Posts: 3392
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: How do I create a camera?
no, unless you want to switch the entire view to the camera, which is commonly considered annoying.
- 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?
You might want to, y'know, read the page.
It tells you exactly how to set up a camtex with ANIMDEFS.
It tells you exactly how to set up a camtex with ANIMDEFS.
Re: How do I create a camera?
Ah, I understood you wrong. In that case, try XutaWoo's link - it's not at all hard to do.Um. That changes the whole screen, right? I wanted a camera that's on a texture next to said switch..
Re: How do I create a camera?
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.
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.
Re: How do I create a camera?
No.Manhunt21 wrote:Is there a way to do it without ANIMDEFs?
Too bad for you then.Manhunt21 wrote:Because I don't understan ANIMDEFs at all!
Re: How do I create a camera?
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
, 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.
Code: Select all
CAMERATEXTURE <cameratexture> <width> <height>
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.