I'm looking for ways on how to creating a right-side third person camera for a third-person shooter, but I don't know how it's done. I have seen many maps with this neat trick. This YouTube video will hopefully show an example as to what I'm talking about. Also, look up Project Vector. What must I do to get this kind of TPS camera? What are the triggers and functions?
try this one. I haven't tried it out before, but it's by OneTwoSC and he tends to write good ones. All you need for the right side view is to have the camera offsetted to the right.
Which offset are we talking about. I'm using the camera settings through triggers, and I don't know which one moves the camera from the left side of the screen to the right.
Hmm Finally looked at his tutorial, you can't modify offsets for that camera. The way the guy did it in your original post was probably using triggers to set the camera's rotation and zoom levels and panning it in order to move it with the unit, and keep the units facing. It'd be a really interesting system.
The smoothest way is to use an invisible helper unit, with a camera that follows that unit. The Camera needs to be set up via Data in order to decrease the movement smoothing with the "Follow Unit Group" function.
The Helper unit then just needs to be positioned at the right location in each Tick. Move (smooth) would be sufficient for that.
This is what I did here:
Something to avoid is placing the camera via Trigger in each Tick because you'll position every 1/16th of a second, which means it won't look good. Most functions that handle stuff natively like follow unit group often work at a higher rate.
In order to keep the movement of the camera smooth enough you'll have to mess with the smoothing parameters inside the Camera Data to find the optimal between smooth movement and tightness.
Project Vector also does it like that as far as I can remember.
Okay. This is the current TPS engine that I have: http://www.sc2mapster.com/forums/development/triggers/7277-third-person-shooter-tps-engine-download-if-you-need/. In case you ask, the creator of this mod allows everyone to use and edit it. I just need to know what triggers to use. I'm not sure I understand ticks, perhaps you can clarify. What's a helper unit? And assuming that I understand you, the trick with the camera involves two different units: one invisible while the other is visible?
The smoothest way is to use an invisible helper unit, with a camera that follows that unit. The Camera needs to be set up via Data in order to decrease the movement smoothing with the "Follow Unit Group" function.
The Helper unit then just needs to be positioned at the right location in each Tick. Move (smooth) would be sufficient for that.
This is what I did here:
Something to avoid is placing the camera via Trigger in each Tick because you'll position every 1/16th of a second, which means it won't look good. Most functions that handle stuff natively like follow unit group often work at a higher rate. In order to keep the movement of the camera smooth enough you'll have to mess with the smoothing parameters inside the Camera Data to find the optimal between smooth movement and tightness.
Project Vector also does it like that as far as I can remember.
Yes you will need a new unit. Preferably a completely new unit type to keep things clean. And yes you will have two units for each player in the game. Don't forget to make the helper invincible and remove collision.
Create a new Camera in the Data Editor. And Remove the Zoom states and change the bounds for pitch to something that makes more sense in a shooter.
Then look for parameters that are related to Target Smoothing. These are the ones you need to change in order to decrease the amound your camera lags behind while following. The faster you unit can move the faster your camera's acceleration needs to be.
In the Map Initialization Trigger add the necessary methods to create a helper for each TPS player. And store it in a variable to have access to it later. Then change the unit that is being followed to the helper unit. You also should change the Camera Data that is used to the new one you created. You'll find the method if you look for it. (hint: use the search bar and look for camera data)
in Move Player unit you can need a Move Unit (Instantly) Method at the end, that moves the helper unit to it's destination. Enabling Blend would be recommended, but is not necessary if the Camera's Target Smoothing is set up correctly. Try to find something that suits your needs, it's different depending on how you want it to be.
While you're at it. Decrease the timer from 0.04 seconds to 0.0125 seconds. To further optimize, precalculate the Move Direction when the buttons are pressed or released and store it. This way you can simplify the Periodic Trigger significantly.
Same with the Rotate Camera Trigger. Change the Event to "Camera Moves". This way it only fires when a player acutally moves the camera rather than firing each Tick.
Im currently working on improving the existing TPS engine I have. The only thing that is lacking now is that the movement of the unit isnt smooth enough, as in, when the unit turns with my camera the unit does so in steps which makes it look really ugly. Tomura, whats the best way to make the turn rate of the unit super smooth, like in your TPS engine video you posted? If at all possible, without scripting, as I cant really script...
What I'm doing is increasing the time the unit needs to turn. The "Make Unit Face ..." Action allows you to set the time the rotational movement should take. Since Map Script has 0.0125 game time seconds between each tick, you need to time it to this. The actual rotation is then handled at a much higher speed.
If you are updating the Rotation at a slower interval, use that time. If it isn't smooth enough increase the time. The units rotation will be lagging behind the camera's rotation. You will have to find a good balance. The trick is to have the unit still rotating or stopping when the next rotation is passed to the unit. If the unit finishes it's movement before that it will stop for a short moment.
That is definately a good tip, but unfortunately it doesnt touch upon the core of the problem I have.
I can make the turning smooth, but the biggest problem which I have with my engine (which is a highly modified version of martinolssonĀ“s engine, btw) is that subtle camera movement doesnt even seem to register, which is VERY apparent when walking. Basically, if I turn the camera just off to the side so that the target cross is right next to the head of my character, my character wont turn into that direction. He will only turn if the camera movement is abit more extreme, basically, twice as far (it also doesnt matter how long I remain at that angle, the character just wont turn).
This is less noticable when my character is standing, but when my character is walking, he makes abrupt turns due to this, which is really ugly. It also means that I can look into a slightly different directon than Im walking.
While it doesnt affect gameplay much, it looks really really ugly and I really want a solution for this, and there seems to be one, as your engine doesnt seem to have that problem, among other engines as well. Any ideas?
sounds like the increments of your Camera Data aren't set up properly.
Go to the camera you are using in the Data Editor. There you can find the fields Rotation Increment and Perspective Increment. They control the increment for those values for the script. Smaller values tend to create more networking load, since they need to be updated more frequently for all other players, so don't overdo it.
Mh, Ive now experimented around with these values and it doesnt really seem to change anything at all. IĀ“ll experiment around abit more, but I think it might be something else. I assume that in your map the "unit faces camera" action is triggered, right?
I'm looking for ways on how to creating a right-side third person camera for a third-person shooter, but I don't know how it's done. I have seen many maps with this neat trick. This YouTube video will hopefully show an example as to what I'm talking about. Also, look up Project Vector. What must I do to get this kind of TPS camera? What are the triggers and functions?
Please look throught the mulitple tps camera tutorials available both in our wiki and on youtube.
I know how to make a TPS. And which tutorial? There are like hundreds of sections to look up. Which one is relevant to what I'm talking about?
Okay. Dead Space camera. How do I get a Dead Space camera?
try this one. I haven't tried it out before, but it's by OneTwoSC and he tends to write good ones. All you need for the right side view is to have the camera offsetted to the right.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
Which offset are we talking about. I'm using the camera settings through triggers, and I don't know which one moves the camera from the left side of the screen to the right.
@StarGazingContinuum: Go
Hmm Finally looked at his tutorial, you can't modify offsets for that camera. The way the guy did it in your original post was probably using triggers to set the camera's rotation and zoom levels and panning it in order to move it with the unit, and keep the units facing. It'd be a really interesting system.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Does anyone know who made that map so that I can contact him?
iWaNN made it. I took a look at one of his maps once, as far as I recall the camera system is scripted, not triggered.
The smoothest way is to use an invisible helper unit, with a camera that follows that unit. The Camera needs to be set up via Data in order to decrease the movement smoothing with the "Follow Unit Group" function.
The Helper unit then just needs to be positioned at the right location in each Tick. Move (smooth) would be sufficient for that.
This is what I did here:
Something to avoid is placing the camera via Trigger in each Tick because you'll position every 1/16th of a second, which means it won't look good. Most functions that handle stuff natively like follow unit group often work at a higher rate. In order to keep the movement of the camera smooth enough you'll have to mess with the smoothing parameters inside the Camera Data to find the optimal between smooth movement and tightness.
Project Vector also does it like that as far as I can remember.
@Tomura: Go
Okay. This is the current TPS engine that I have: http://www.sc2mapster.com/forums/development/triggers/7277-third-person-shooter-tps-engine-download-if-you-need/. In case you ask, the creator of this mod allows everyone to use and edit it. I just need to know what triggers to use. I'm not sure I understand ticks, perhaps you can clarify. What's a helper unit? And assuming that I understand you, the trick with the camera involves two different units: one invisible while the other is visible?
We need to talk, I`ll send you a PM.
@StarGazingContinuum: Go
Yes you will need a new unit. Preferably a completely new unit type to keep things clean. And yes you will have two units for each player in the game. Don't forget to make the helper invincible and remove collision.
Create a new Camera in the Data Editor. And Remove the Zoom states and change the bounds for pitch to something that makes more sense in a shooter. Then look for parameters that are related to Target Smoothing. These are the ones you need to change in order to decrease the amound your camera lags behind while following. The faster you unit can move the faster your camera's acceleration needs to be.
In the Map Initialization Trigger add the necessary methods to create a helper for each TPS player. And store it in a variable to have access to it later. Then change the unit that is being followed to the helper unit. You also should change the Camera Data that is used to the new one you created. You'll find the method if you look for it. (hint: use the search bar and look for camera data)
in Move Player unit you can need a Move Unit (Instantly) Method at the end, that moves the helper unit to it's destination. Enabling Blend would be recommended, but is not necessary if the Camera's Target Smoothing is set up correctly. Try to find something that suits your needs, it's different depending on how you want it to be.
While you're at it. Decrease the timer from 0.04 seconds to 0.0125 seconds. To further optimize, precalculate the Move Direction when the buttons are pressed or released and store it. This way you can simplify the Periodic Trigger significantly.
Same with the Rotate Camera Trigger. Change the Event to "Camera Moves". This way it only fires when a player acutally moves the camera rather than firing each Tick.
Im currently working on improving the existing TPS engine I have. The only thing that is lacking now is that the movement of the unit isnt smooth enough, as in, when the unit turns with my camera the unit does so in steps which makes it look really ugly. Tomura, whats the best way to make the turn rate of the unit super smooth, like in your TPS engine video you posted? If at all possible, without scripting, as I cant really script...
What I'm doing is increasing the time the unit needs to turn. The "Make Unit Face ..." Action allows you to set the time the rotational movement should take. Since Map Script has 0.0125 game time seconds between each tick, you need to time it to this. The actual rotation is then handled at a much higher speed.
If you are updating the Rotation at a slower interval, use that time. If it isn't smooth enough increase the time. The units rotation will be lagging behind the camera's rotation. You will have to find a good balance. The trick is to have the unit still rotating or stopping when the next rotation is passed to the unit. If the unit finishes it's movement before that it will stop for a short moment.
That is definately a good tip, but unfortunately it doesnt touch upon the core of the problem I have.
I can make the turning smooth, but the biggest problem which I have with my engine (which is a highly modified version of martinolssonĀ“s engine, btw) is that subtle camera movement doesnt even seem to register, which is VERY apparent when walking. Basically, if I turn the camera just off to the side so that the target cross is right next to the head of my character, my character wont turn into that direction. He will only turn if the camera movement is abit more extreme, basically, twice as far (it also doesnt matter how long I remain at that angle, the character just wont turn).
This is less noticable when my character is standing, but when my character is walking, he makes abrupt turns due to this, which is really ugly. It also means that I can look into a slightly different directon than Im walking.
While it doesnt affect gameplay much, it looks really really ugly and I really want a solution for this, and there seems to be one, as your engine doesnt seem to have that problem, among other engines as well. Any ideas?
sounds like the increments of your Camera Data aren't set up properly.
Go to the camera you are using in the Data Editor. There you can find the fields Rotation Increment and Perspective Increment. They control the increment for those values for the script. Smaller values tend to create more networking load, since they need to be updated more frequently for all other players, so don't overdo it.
Mh, Ive now experimented around with these values and it doesnt really seem to change anything at all. IĀ“ll experiment around abit more, but I think it might be something else. I assume that in your map the "unit faces camera" action is triggered, right?
Ive send you another PM, Tomura.