Rotation question

Hi
I have mesh that I am trying to rotate based of the relative rotations of 3 objects
Picture for reference.


The black circle is the mesh I am trying to rotate.
I’m getting the relative rotation (YAW) of the green arrow ( point 1 ) and using that to drive the Yaw rotation of the mesh, But I dont want it to be 1 -1 More like 50%.
I am also getting both the 2 look at Rotations from the Black circle (mesh) to the smaller red ones, (points 1/2) And trying to use those rotations values to each drive the rotation of the black circle Also by 25%. This brings the total float value to 100%.
This way the black circles forwards vector should always be rotated to face the
between the 2 red ones, providing the green arrow is also looking directly between them.
I Have solved this in the animation BP but Im trying to solve this in the characters BP and having a hard time.
I hope this made sense.

Hi @BaseReality

i am afraid that something is wrong. or i dont understand.
(and i am not sure to understand the figures , did you miss to write point 1 , and point 2 ?)
by the way,
If you just need to point the mesh in the middle of the two dots,
you can get the location of these 2 and get a middle point.
than you can “lookat” that point to get the rotation for the mesh.

hope i get it right, otherwise , reply :stuck_out_tongue:

Yes Im trying to make the mesh 100% face between the 2 red dots when the green arrow is also looking in that direction.
Basically the green arrow can only set the rotation of the mesh by 50%
And Im trying to get the red dots to be the other 50%
This way its not 1-1 unless all directions match.
I hope I cleared that up. Not an easy thing to describe.
Im interested in your suggestion But Im not sure how to get that middle location for the look at rotations of the red dots.

Anyone know How I could get the middle of a vector between 2 points and make it a location, that a look at node could point to?
Tried this But :frowning:


The Hands Vector Mesh Is just a test to see if its working But on the wireframe view its at the world origin? so it seems my code is not delivering the world Location to the set location node

Like this:

Screenshot_1

You can see it in action here, positioning text render.

take a look also at lerp rotation
You can lerp the rotation toward the midpoint
with the rotation of the arrow. at 0.5 you should have what you want

Thanks . That trick worked perfectly.
But I Have small issue left to solve that Im having a hard time with.

So I have the 2 rotations, one from the HMD location, And one from the character mesh Look at rotation to the point between the hands.
But I cant seem to make it work correctly where each rotation sets the rotation of the character mesh at 0.5 / 50% each.
This Is what I But It is really Buggy and the rotations keep getting messed up when I turn 180 degrees.

i think i know whats the problem,
Since the quaternion of rotation go from - 180 to 0 to +180
when you lerp between the gap he go creazy, when you move from -179 to +179 !

I dont remember if i made manually the calculation or if there is an escapeway …
or if i completely flipped out the problem changing everything .

1 Like