Hi, I'm trying to make a specific unit move with the arrow keys, or WASD.
W is forward, S backwards, A turns the unit left, D turns the unit right.
Only difference is the camera. I don't want it FPS camera, i want a camera that is set and turns as the unit turns, as to keep it looking in the direction you are facing.
If someone could link or explain the triggering... thank you.
And also set camera bounds to region from circle ((unit point)(.01))
This run this every 0.0 seconds along with the camera yaw set mentioned above. This way the camera will not just face the unit's direction, it will also follow the unit around.
I figured this is a close enough situation to mine to put in this thread instead of starting a whole new thread for a seemingly common issue.
I have a unit which I like to still be controlled by selecting the unit and right clicking but I want the camera to follow behind the unit so as he turns so does the camera. But I'd also like to be able to control the rotation of the unit via holding a mouse button and rotating the camera view thus rotating the unit. I've tried many ways but the camera typically starts behind the unit, however after rotating the camera too much the view gets out of place.
I don't mean to steal your thread Puged, I'm looking into you problem now and will post a response if I figure it out.
EDIT:
Off the top of my head what you want would consist of something along the lines of:
Event:
Player '1' Presses 'A' key 'Down' with shift 'Allow', control 'Allow', alt 'Allow'
Actions:
'Issue Order' (I'm trying to find out how this would work)
Every 0.0 sec set camera yaw to facing angle of specified unit
never use every 0.0sec timer ... that will make a dozens of trigger runs in the game,
i have like 50 - 70 trigger in my map, they get used a lot. but when i applied that timer, on 10 sec it had run over 1900 times , and increased the lag 100 times more.
instead set the timer to 0.2 and the camera to 0.5 so it will take the camerea 0.5 sec to get to the rigth view
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, I'm trying to make a specific unit move with the arrow keys, or WASD. W is forward, S backwards, A turns the unit left, D turns the unit right. Only difference is the camera. I don't want it FPS camera, i want a camera that is set and turns as the unit turns, as to keep it looking in the direction you are facing. If someone could link or explain the triggering... thank you.
@Puged: Go
Every 0.0 sec set camera yaw to facing angle of specified unit
@Kanaru: Go
And also set camera bounds to region from circle ((unit point)(.01))
This run this every 0.0 seconds along with the camera yaw set mentioned above. This way the camera will not just face the unit's direction, it will also follow the unit around.
How do you set the camera yaw?
Camera - Set Repair Bot(Camera) Angle Of Attack to (Facing of Automaton 2000 [61.48, 149.42])
This is the best I could get because I didn't know how to set it to yaw.
And about the movement, how do you make a unit turn as you hold down A or D keys.
I figured this is a close enough situation to mine to put in this thread instead of starting a whole new thread for a seemingly common issue.
I have a unit which I like to still be controlled by selecting the unit and right clicking but I want the camera to follow behind the unit so as he turns so does the camera. But I'd also like to be able to control the rotation of the unit via holding a mouse button and rotating the camera view thus rotating the unit. I've tried many ways but the camera typically starts behind the unit, however after rotating the camera too much the view gets out of place.
I don't mean to steal your thread Puged, I'm looking into you problem now and will post a response if I figure it out.
EDIT:
Off the top of my head what you want would consist of something along the lines of:
Event: Player '1' Presses 'A' key 'Down' with shift 'Allow', control 'Allow', alt 'Allow'
Actions: 'Issue Order' (I'm trying to find out how this would work)
never use every 0.0sec timer ... that will make a dozens of trigger runs in the game,
i have like 50 - 70 trigger in my map, they get used a lot. but when i applied that timer, on 10 sec it had run over 1900 times , and increased the lag 100 times more.
instead set the timer to 0.2 and the camera to 0.5 so it will take the camerea 0.5 sec to get to the rigth view