Set View Target With Blend moving through mesh

When i press interact button while behind it, I want to camera to go forward of cabinet then go inside it but it goes directly inside it. I thinked long time and couldnt find a solution. Anyone who can help? Thanks.

Yeah. As convenient as it may seem, the node is pretty dumb - in a way that it offers little customization and control over what is going on. You will need to script your own logic for a precise camera movement.

A separate Pawn with a timeline would do the trick. For something even more advanced, you could dynamically create a spline path and have this new camera pawn follow it using the aforementioned timeline - that’s something I’d go for.

  • check if we’re behind the wardrobe with Dot product
  • if so point 0 is our player
  • point 1 is (-)right vector multiplied by a fixed amount
  • point 2 is forward of the wardrobe, multiplied by a fixed amount
  • point 3 is inside the wardrobe
  • set spline points
  • shift camera along the spline

There is also the camera manager which can be overridden - might work even better than fiddling with a separate pawn.

Oh, i could do that but i thought there is more simple solution. It looks like it will take my time :slight_smile: Thanks.

What if you did not allow interaction from the back? Also a solution… :blush:

Ha, I toyed with the idea of suggesting giving the wardrobe an offset dummy actor embedded in a child actor component the set view now can target. It’s hacky enough to work.

But then the wardrobe ends up too close to the wall and we be clippin’ again… A great solution to test things out, though.

Use 2 or X cameras, blend X times if you are from behind. One camera in one side of the closet.

I’d invest in figuring out how to feed data here:

image

This way you need no additional cameras, or components. But you need a lot of math which can be a downer.

I thought about it, but when i looked to some games which allows interaction from back, they were cool. And my game has some fast parts like chasing, player shouldnt waste time to interact with it

1 Like

I’ll try do something like that. I’ll update when i finished

No additional components / actors. We pack the entire helpless player into the closet. :face_with_raised_eyebrow:

This should execute only from behind, ofc.

1 Like

You can actually make this work pretty well by moving the spring arm off axis, i was having the same issue, the camera was inside of my character. I just moved it way back and got the view i wanted.