Announcement

Collapse
No announcement yet.

Camera orbiting around non centered object

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

    Camera orbiting around non centered object

    So if I have a camera and an object, each in it's own blueprint, I'd like to have the camera look at the object. BUT, I don't want to have the object right at the center in the camera view, but more to the right.

    The problem appears when I have to make the camera orbit the object, but also keep the object non centered when looking at it.

    The view I want to maintain is depicted in the image below. The square would be the object(non centered), that would have to remain in that position of the camera view even when the camera orbits around that object.

    Anyone have any idea how to arrange the code and what functions to use to achieve this?



    Click image for larger version

Name:	71626-rotation.jpg
Views:	1
Size:	41.9 KB
ID:	1169051

    #2
    Yeah, In the camera bp set up a scene component, then the boom as a child and the camera as the final child on the boom. On event tick create a sequence, 1:rotate boom by setting boomRelativeRotation, 2:get lookAtRotation from CameraWorldLocation to ActorWorldLocation and set CameraWorldRotation.

    You could also fake this whole thing by extending and retracting the boom during the rotation. Would look off centered but isn't.

    Comment

    Working...
    X