Announcement

Collapse
No announcement yet.

Locking the Camera Around an Axis

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Locking the Camera Around an Axis

    Hi everyone,

    In the game I'm working on, the player will go from island to island. When on an island, you will walk around in 3rd person mode.

    The only thing is, I don't want the player to move around the camera. I want the camera to be "looking at" the center of the island at all time. I have no idea how I would approach that.

    I made an image of what I want to achieve, in case my English isn't good enough to convey the idea.


    Thanks in advance for helping out!

    Click image for larger version

Name:	ss1.jpg
Views:	70
Size:	99.1 KB
ID:	1600665

    #2
    Ok so I found the solution and it was quite simple.

    -First I delete de camera in the Player Blueprint
    -Then I create a new BP Class. In it I just create an arrow to which I attach a camera as a child.
    -In the Event Graph I then do this: Click image for larger version  Name:	ss5438.jpg Views:	1 Size:	109.1 KB ID:	1600699
    -I then drag my new BP_Camera into my scene and place it where I the camera to rotate from. In my case that's in the middle of the island.
    -Go to the details panel and select the camera. I Move it back away from the center until I get the view of my choice. If you need to move the camera sideways, select the whole blueprint and rotate it, instead of moving the camera individually on that axis.
    -Finally, in the Level Blueprint, I do this:
    Click image for larger version  Name:	ss456567.jpg Views:	1 Size:	65.8 KB ID:	1600700

    From there everything should work.
    Last edited by Expod260; 03-29-2019, 01:23 PM.

    Comment

    Working...
    X