HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

An FPS Camera

11-23-2003, 02:47 AM#1
ChaoticPeasant
I'm not very good with camera triggers, so can someone please help me on how to make an FPS camera(obviously infront of a unit).

Thanks in advance.
11-23-2003, 03:19 AM#2
Hunter0000
Just get the 3rd person cam from the trigger repositary and cgange the camera prop thing so its in front of the target not behind it.

Hint: try setting the distance to target to a negitive to see how it works.
11-23-2003, 06:21 PM#3
LegolasArcher
I tryed that. It just goes to "0" ingame although you set it to a negative- so your inside the unit
11-23-2003, 06:45 PM#4
ChaoticPeasant
Well, I didn't EXACTLY get what you were trying to say(not specific enough), so I came up with this for a rifleman.

The problem is, though, whenever i set rotation to then unit, it messses up, but it is messed up the way it is right now too...

CamLock
Events
Time - Every 0.20 seconds of game time
Conditions
Actions
Camera - Apply Camera 001 <gen> for Player 1 (Red) over 0.20 seconds
Camera - Lock camera target for Player 1 (Red) to Rifleman 0002 <gen>, offset by (510.00, 250.00) using Default rotation
Camera - Change camera smoothing factor to 30.00

That is all I have changed(and the camera's default spot a bit), but adding this to it:
Camera - Set Player 1 (Red)'s camera Rotation to (Facing of Rifleman 0002 <gen>) over 0.00 seconds

messes it up even more, so I still need help...
Here's the map from the repository with my changes if you want to edit it this way and put it up for dl instead of explaining.
11-23-2003, 10:10 PM#5
Hunter0000
I ALMOST have it, but I need one thing from you guys

How would I go about setting a rotaion offset with x,y coordinates, what kind of math equation would I use?

Example,

If the rifleman is facing 90, the x,y would be 0,50

If he is facing 135 it would be -25,25

180 would be -50,0

and 270 would be 0,-50

What kind of equation would I put in the x,y values?
11-23-2003, 11:23 PM#6
DiscoDave
I don't know of an actual calculation that would do that, although there probably is one out there. If nobody comes up with it, you could always brute force it:


if angle >=0 and angle < 90

ypoint = angle / 1.8
xpoint = 50 - ypoint

if angle >= 90 and angle < 180

angle = angle - 90
xpoint = angle / 1.8
ypoint = 50 - xpoint
xpoint = -(xpoint)

if angle >= 180 and angle < 270

angle = angle - 180
ypoint = angle / 1.8
xpoint = 50 - ypoint
xpoint = -(xpoint)
ypoint = -(ypoint)

if angle >= 270 and angle <= 360

angle = angle - 270
xpoint = angle / 1.8
ypoint = 50 - xpoint
ypoint = -(ypoint)


That should work, even if it's not the best solution.
11-24-2003, 12:16 AM#7
Hunter0000
Math equation is better, much better considering that there are somewhere between 20-50 differn't angle postions...

[glow=green,2,300]HOLY ****![/glow]

I did it! I did It!

I'm going to post it into the repository, ok?
11-24-2003, 12:55 AM#8
linkmaster23
lol, that was alot of time taken...thanks i learned sumthin
:ggani: