Question on function "Grab Component At Location With Rotation()"

image
image

I understood that function would catch a component in a specific location and rotation.
But I can’t understand the effect of Rotation.
When I set the value of Rotation as HitResult->GetComponentRotation() then target object always rotate like under image no matter what the initial rotation of the target object was.
image 1

But When I set the value of Rotation as GetComponentRotation() then target object maintain the appearance of being grabbed.

before
image 2
after
image

thank you

Think of it as a delta between Grab and SetTarget. Grab will set the starting rotation to be used for calculating the target rotation.

Using Grab and SetTarget with GetComponentRotation() you’re effectively saying its already in the target rotation and then will keep in that rotation relative to you. Whereas using the HitActor’s rotation for Grab and then GetComponent for SetTarget it will be working out how to rotate itself to match the component’s rotation.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms