Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Static Camera aiming and movement issue


I really rarely have the need to come here and ask for help but this time I'd like to have this over with and continue with my project.

Basically I'm having a static camera issue which doesn't really show up when using one player because it rotates towards it, but it comes when having two players because it actually rotates towards a point between them.

The way i'm developing my character, both the movement and the aiming are based on a "Find look at rotation" between the camera and the character itself, but when booting up another player, this system no longer makes sense.

I'll upload some images about this issue but I would REALLY appreciate if you watched a minute and a half video i made about this to explain it at the best of my abilities.

alt text

alt text


What's a good approach to base my character rotation on?

Product Version: UE 4.21
issue-1.jpg (144.7 kB)
issue-2.jpg (169.2 kB)
more ▼

asked Jan 15 '19 at 06:47 AM in Blueprint Scripting

avatar image

26 3 5

avatar image ErtieZone Jan 17 '19 at 06:23 AM

Bumping because this is a logic problem I cannot find any cases on youtube of. Haven't seen any documentation on free movement on static camera.

Has anyone played Assault Android Cactus, Devil May Cry?

avatar image HarryHighDef Jan 17 '19 at 09:56 AM

If you have the point the camera is rotated towards why not use that in your find look at for aiming?

avatar image ErtieZone Jan 18 '19 at 06:41 PM

Thanks for the reply.

Have you watched the video? The camera points at the center of both two characters but if you give it a second of thought, using THAT rotation makes no sense, because as the players stray away from each other, "up" should start to be slightly different but there is no way to update that using only camera rotation since it is just rotated towards an indiferent point.

I can try to explain this more if it is not clear. Let me know.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first


You didn't show the code that compute your up vector in your video (weird choice when you want to fix this issue ^^), anyway, you have to use the Forward vector of your camera to set your up vector (and right vector), (it doesn't depend on your character location according to your request).

more ▼

answered Jan 18 '19 at 09:58 PM

avatar image

111 1 3 2

avatar image ErtieZone Jan 19 '19 at 12:06 AM

I think I did, but in any case it's the same as the other vector:

alt text

Now i had tried already what you proposed, and i think you mean this:

alt text

Well this is how aiming straight up with a controller does with that logic:

alt text

Maybe I got tunnel vision but i don't think this is how aiming should be in a game.

1.jpg (285.1 kB)
2.jpg (189.9 kB)
3.jpg (161.4 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Forward vector is not used this way.

alt text

more ▼

answered Jan 19 '19 at 03:31 PM

avatar image

111 1 3 2

avatar image ErtieZone Jan 19 '19 at 05:28 PM

Thanks for the reply!

I will try this later and let you know, though all of that seems different than my approach. Whether or not I should use up vector instead of forward, I cannot decompose just now in my head.

I'll boot up UE later and update here.

avatar image ErtieZone Jan 19 '19 at 06:07 PM

Alright so I was really overwhelmed by too much work to even realise the posibility of Up Vector. That's a good call!!

Still my character is aiming sideways properly but literally up and down when pushing the stick up and down, instead of "forth" and "back". Which still makes it useless.

Will give it some tinkering later and update back. Any more tips about a top down or hacknslash camera would be really appreciated.

avatar image ErtieZone Jan 24 '19 at 12:36 AM

After some thought i feel like the up vector suggestion is intended for aiming Up and Down, but my character never aims up and down. Just around itself. Top down shooter.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Im pretty sure that this explanation is going to be confusing af but i'll still try to make it somewhat "simple" So you could place 2 boxes on your map, those boxes are going to act like "face cameras" that always follow your players and always stay on original camera's right vector. Blueprint on this screenshot is not copy paste or anything (im tired and going to bed so just put something together fast) but it explains the steps and on 3rd screen you have picture that might somewhat explain what we're doing here. On top of that i didnt mention in that screenshot that for it to work really good it would be kinda necessary to spawn another box that basically copies camera rotation and position except Y-rot and you have to place it on the same level as your characters. All that simply cause all that math there is done on a plain but the second you add height to it it's going to be accurate especially when characters get really close to the camera. You could fix it like i said with spawning another box that copies camera just stays at character level and then use that box instead of original camera for grabbing distance and stuff. Well if you think this is something that you could use and have questions or help with something just ask, i'll be here again in few hours

edit: no it is not tested but the math doesn't lie! :) alt text

asd.jpg (919.6 kB)
more ▼

answered Jan 24 '19 at 04:23 AM

avatar image

5 1 2

avatar image ErtieZone Jan 24 '19 at 05:16 AM

I really really appreciate the time you put into this. Thanks!!

Still it's been some hectic days for me and it's getting really gooey for me to just understand what you're saying by eye-scanning.

I'll give it a good read in some hours, or if you are available for some discord call it'd be heavenly.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question