Like the title says I need a FP camera. I am making yet another map I'll probably never finish, if anyone was wondering.
So anyway, I've got it pretty close. I tried to make the movement triggers myself but couldn't and just copied from another map. So without getting into details in how the movement system for the W, A, S, and D keys work, here's what I got:
debugEventsGame-MapinitializationLocalVariablesConditionsActionsUI-DisableSmartClickfor(Playergroup(1))UnitSelection-SelectJimRaynor(Marine)[12.95,53.50] for player 1
Unit - Create 1 Invisable unit for FPS camera (Marine) for player 1 at ((Position of Jim Raynor (Marine) [12.95,53.50]) offset by (0.0, 0.0)) facing (Position of Jim Raynor (Marine) [12.95,53.50]) (No Options)
Variable - Set Invisable unit for player 1 debug] = (Last created unit)
Region - Attach FP view region 1 to Invisable unit for player 1 debug] with offset (Point(0.0, 0.0))
UI - Hide game UI for (Player group(1))
Camera - Apply First Person for player 1 over 1.0 seconds with Existing Velocity% initial velocity, 0% deceleration, and Include Target
Camera - Apply camera object Distance 0.0 for player 1 over 0.0 seconds with Existing Velocity% initial velocity and 0% deceleration
Camera - Apply camera object Height Offset 1.0 for player 1 over 0.0 seconds with Existing Velocity% initial velocity and 0% deceleration
Camera - Lock camera mouse relative mode On for player 1
Camera - Turn camera mouse rotation On for player 1
Camera - Set the camera bounds for (Player group(1)) to FP view region 1 (Do adjust the minimap)
Invisable unit for player 1 debug] = No Unit <Unit>
Handle Motion
Events
Timer - Every 0.05 seconds of Game Time
Local Variables
Conditions
Actions
Unit - Order Jim Raynor (Marine) [12.95,53.50] to ( Move targeting ((Position of Jim Raynor (Marine) [12.95,53.50]) offset by Polar Velocity (r)[1] towards ((Current camera yaw of player 1) + Polar Velocity (theta)[1]) degrees)) (Replace Existing Orders)
Unit - Move Invisable unit for player 1 debug] instantly to (((Position of Jim Raynor (Marine) [12.95,53.50]) offset by (0.0, 0.0)) facing (Facing of Jim Raynor (Marine) [12.95,53.50]) degrees) (Blend)
Camera - Pan the camera for player 1 to (Center of FP view region 1) over 0.0 seconds with Existing Velocity% initial velocity, 0% deceleration, and Do Not use smart panning
The camera follows the unit's movements, and looks fairly close. All I need to know is:
1. How to make it so the camera is slightly in front of the unit at all times (you can still see the unit's various bits and pieces while idling and when you look down you see inside the unit.)
2. Force the camera to stay at unit level at all times. (The camera raises automatically whenever passing by a cliff and I can't seem to figure out how to stop that.)
Rollback Post to RevisionRollBack
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
I am pretty confident that a camera controlled smoothly with the mouse would be very challenging for a computer. So many triggers if you want it to be 'smooth'
For the 1st I'd recommend using sin, cos functions witch unit's facing angle. It'll be simple trigonometry, like xPos = xPos + cos(A). There might be something even simplier.
As for the 2nd, I think it's impossible :( You can move the camera to the unit's height every n ms.
There is a action that is called "Turn Camera Height Displacement On/Off" needs to be turned off. Then there also is the "Height Smoothing On/Off" Action. This also need to be turned off.
The problem with seeing you unit can only be solved with a FirstPersonArms model. The Controlling player has the normal Unit model hidden and can only see the FPS Arms model. The normal unit model needs to be displayed to the other players and the FPS arms need to be hidden from them.
That's how real FPS games do it. It's also possible in sc2, but I bet you don't have a FPS arms model.
For starters just hide the unit model for the controlling player.
Also I'd rather use the Follow Unit Group action for updating the camera's position. To disable the smoothing you have to set your camera up properly in the data editor. (There are some fields for target smoothing)
Well, I actually already tried both those things, neither worked. I'm pretty sure as of this patch "Turn Camera Height Displacement On/Off" is broken because I've been hearing that around a lot.
As for first person arms; I'm not looking for a FPS camera, just a first person camera. This is only designed as an alternative camera option. Something for the player that would rather play my map "up-close and personal" style rather than RTS style.
Also, if I fail to work my current camera, I will use follow unit, but it follows unit "third-person" style, which is no good.
Edit: I didn't read Tomura's answer close enough. Sounds like exactly the solution I need. Thanks for all the suggestions. Feel free to post more in case it doesn't work.
Sorry for the late responses, none of your answers showed up until I tried posting my own. I don't know why. :/
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
So I tried hiding the unit, and it seems the only way to do that is with "permanent cloak" and then sharing vision of the unit with whatever player isn't the current.
I can't do that because first of all then the player could see where the unit is and secondly because it tints the unit to make it look odd.
So o3210 if you could give me a bit of help or if someone knows how to hide a unit more effectively I'm all ears.
and it ALMOST works. When I turn left I see the unit and when it corrects itself it's like the problem I was having before, where you could still see the unit.
Any way to fix this? Did I do it wrong?
EDIT+: So I'm going to foget getting as "up-close and personal" as I wanted to. If anyone knows how to fix this, I'll be keeping an eye on this thread
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
To post a comment, please login or register a new account.
Like the title says I need a FP camera. I am making yet another map I'll probably never finish, if anyone was wondering.
So anyway, I've got it pretty close. I tried to make the movement triggers myself but couldn't and just copied from another map. So without getting into details in how the movement system for the W, A, S, and D keys work, here's what I got:
The camera follows the unit's movements, and looks fairly close. All I need to know is:
1. How to make it so the camera is slightly in front of the unit at all times (you can still see the unit's various bits and pieces while idling and when you look down you see inside the unit.)
2. Force the camera to stay at unit level at all times. (The camera raises automatically whenever passing by a cliff and I can't seem to figure out how to stop that.)
I am pretty confident that a camera controlled smoothly with the mouse would be very challenging for a computer. So many triggers if you want it to be 'smooth'
For the 1st I'd recommend using sin, cos functions witch unit's facing angle. It'll be simple trigonometry, like xPos = xPos + cos(A). There might be something even simplier.
As for the 2nd, I think it's impossible :( You can move the camera to the unit's height every n ms.
Sorry if not informative, quite sleepy atm :3
@Yaksmanofage: Go
There is a action that is called "Turn Camera Height Displacement On/Off" needs to be turned off. Then there also is the "Height Smoothing On/Off" Action. This also need to be turned off.
The problem with seeing you unit can only be solved with a FirstPersonArms model. The Controlling player has the normal Unit model hidden and can only see the FPS Arms model. The normal unit model needs to be displayed to the other players and the FPS arms need to be hidden from them. That's how real FPS games do it. It's also possible in sc2, but I bet you don't have a FPS arms model. For starters just hide the unit model for the controlling player.
Also I'd rather use the Follow Unit Group action for updating the camera's position. To disable the smoothing you have to set your camera up properly in the data editor. (There are some fields for target smoothing)
@o3210: Go
I barely passed trig, mind giving me a little help? D:
@Tomura: Go
Well, I actually already tried both those things, neither worked. I'm pretty sure as of this patch "Turn Camera Height Displacement On/Off" is broken because I've been hearing that around a lot.
As for first person arms; I'm not looking for a FPS camera, just a first person camera. This is only designed as an alternative camera option. Something for the player that would rather play my map "up-close and personal" style rather than RTS style.
Also, if I fail to work my current camera, I will use follow unit, but it follows unit "third-person" style, which is no good.
Edit: I didn't read Tomura's answer close enough. Sounds like exactly the solution I need. Thanks for all the suggestions. Feel free to post more in case it doesn't work.
Sorry for the late responses, none of your answers showed up until I tried posting my own. I don't know why. :/
Okay, I need some more help with this one....
So I tried hiding the unit, and it seems the only way to do that is with "permanent cloak" and then sharing vision of the unit with whatever player isn't the current.
I can't do that because first of all then the player could see where the unit is and secondly because it tints the unit to make it look odd.
So o3210 if you could give me a bit of help or if someone knows how to hide a unit more effectively I'm all ears.
EDIT: So I tried
and it ALMOST works. When I turn left I see the unit and when it corrects itself it's like the problem I was having before, where you could still see the unit.
Any way to fix this? Did I do it wrong?
EDIT+: So I'm going to foget getting as "up-close and personal" as I wanted to. If anyone knows how to fix this, I'll be keeping an eye on this thread