Download

HOW to set view target with blend to focus on a specific bone?

Hey everyone, I’m trying to make a customization widget for dressing up my modular characters and I’d like the camera to zoom into a certain part of the body depending on the cloth you’re trying to change. What I’d like it to do is to bind the camera to a bone so that the camera will zoom into the right bone despite the height of the character that is being dressed. Any idea how to do it?

Set view target with blend only takes the target actor as input but from there I’m not sure how to tell it to go up and down in order to focus on one specific bone/socket.

Thanks in advance for your help

Hi man,
i would suggest you to create a camera for these Customizations , and move her to the socket location you want to customize.

you can a scenecomponent and place the camera under it,
so you can place the camera at some distance and angle, from the scenecomponent.
Moving the scenecomponent to the Socket location will keep the camera with your offset and angle.

here the node for gettting the socket location Get Socket Location | Unreal Engine Documentation

Thanks for the tip man, I’ve set up a move component to and while the camera does move and it’s nicely interpolated it moves to a random location not even caring about the socket lol.
I fed it target location and rotation (and socket name ofc) with that node you linked me, and as target output in the node i fed it get player character which automatically extracted the root component of the controlled character. Despite all this the camera just goes wherever it pleases and ignores socket location and rotation. What could be wrong? I attached a pic showing my nodes atm

Hi man,
a lot of stuff can go wrong,
if you are sure you get the right “Player character” and so the existing socker , (beware is case sensitive, HAT is not Hat , neither hat)
The big thing is the Target-Relative-location.

The relative transform and wolrd transform,is really confusing sometimes,
run some tests, for example set yourself this “relative location,” to 000, so you should see the Source , if is the chatacter 0,0,0 or the root, or the socket, or whatever,

Beware that everything can have more than 1 location,
there is the world location
the 1° relative location (relative to his first parent)
and even more relative locations, (like the relative location of a camera, child of a scenecomponent, child of an actor XD)
Track your stuff down until you get whats going on XD
You can use also “Draw debug line” to draw a line between 2 location , i often use this to understand whats going on