Ugh. Sigh. I need help with the camera.
by Shane09 · in General Discussion · 02/23/2009 (6:42 pm) · 4 replies
Hello. I need help majorly with the camera. I have looked into the advanced camera resource. However, compiling is a pain. So, I would love to have this done with script. Lets get to the point:
1) I have my camera set at a angle above the player. My view I want from the camera is achieved. I constricted the view and all.
2) However, there is one issue left. I want the camera to follow a path. This way, it forces the player to keep moving. Furthermore, if the camera gets ahead of the player, the player dies. Is this possible?
Any help is greatly appreciated. Thanks.
1) I have my camera set at a angle above the player. My view I want from the camera is achieved. I constricted the view and all.
2) However, there is one issue left. I want the camera to follow a path. This way, it forces the player to keep moving. Furthermore, if the camera gets ahead of the player, the player dies. Is this possible?
Any help is greatly appreciated. Thanks.
#2
You could use a pathed camera. The demo makes use of it if you need an example of how that works. When you spawn into the game and start the camera on it's path you'll give the player control of an avatar but not control of the camera. Then schedule a repeating loop that continuously checks the distance from the camera position to the player's position, if it exceeds "x" amount then kill the player.
It's probably not quite as simple as what I described, but that should give you an idea for a possible solution and a direction in which to start prototyping towards.
02/24/2009 (4:56 pm)
Quote:2) However, there is one issue left. I want the camera to follow a path. This way, it forces the player to keep moving. Furthermore, if the camera gets ahead of the player, the player dies. Is this possible?Yeah, it should be possible. I've not done so myself, but I think I see how to do it.
You could use a pathed camera. The demo makes use of it if you need an example of how that works. When you spawn into the game and start the camera on it's path you'll give the player control of an avatar but not control of the camera. Then schedule a repeating loop that continuously checks the distance from the camera position to the player's position, if it exceeds "x" amount then kill the player.
It's probably not quite as simple as what I described, but that should give you an idea for a possible solution and a direction in which to start prototyping towards.
#3
02/25/2009 (6:19 am)
Thanks. However, I decided only to kill the player when he became stuck. For instance, the camera keeps forcing the player forward. Once the player makes a mistake, like walking into a wall, then the camera will catch up with him & he will be force killed. Would I have to make triggers in front of every possible place he can be killed (only objects such as walls. I don't mean every square of the terrain)?
#4
02/25/2009 (11:59 am)
In that case I think you might have to find some way of constraining the pathed camera to within a certain distance of the player. When you then enter a trigger area (surrounding a wall) you would need to test for possible paths around it, and if no solution exists then you would kill the player. Or just kill the player once the camera exceeds a certain distance after the player enters a trigger area.
Torque Owner Shane09