Unreal 5 VR: Cannot Teleport Actor After Grab

Hello!

I have a simple blueprint that teleports an actor to the player when the player hits the A button.

The actor in question (ShotCam) has a GrabComponent to also enable the user to grab the object.

The script works perfectly until the player grabs the actor.
It no longer executes the teleport if the player has grabbed and moved the actor at any point.

Can someone help me out as to why this is happening?

Thank you!

What happens if you add another instance of the ShotCam actor to the level?

Nothing different from the initial behaviour. It just teleports the first instance of the object around (until I grab it), and ignores the second instance entirely.

Could you check the lenght of the ‘out actors’ array after the grab? Is the lenght still 1 after you grabbed the actor ?

Yes, it is still 1 before and after the grab. The return value from the ‘Teleport’ is also ‘True’ before and after the grab.

Could you check this post and make sure this is not related to physics simulation?

I created a dummy VR project with a ‘ShotCam’ actor that contain only a white sphere as a visual representation, and there your teleport BP code is working fine - as long as the ShotCam actor physics simulation is not enabled.

Thank you for this reference post!

I’ve worked around this issue by using the ‘Set World Location and Rotation’ function instead of ‘Teleport’ and targeting the parent Static Mesh object within the actor instead of the actor itself. Not entirely sure why this works and teleporting the actor doesn’t after a grab, but oh well! It works!

Thanks for your help with this.

But actually, I’m leaving this post unresolved for a few reasons:

-Changing from teleport actor to set world location doesn’t behave the same, for some reason. Set World Location teleports from the object’s center point, and teleport teleports the front of the object to the player pawn’s camera (which for my purposes, is the intended behaviour, as I don’t want to see the object directly infront of the camera).

-We still don’t know why Grabbing permanently disables the object from teleporting, and I’d love to know why to get the original functionality to work the same

The function ‘SetPrimitiveCompPhysics’ in the grab component is called every time you release a grabbed component.

You could check in the ‘TryRelease’ function if your grabbed item is the ShotCam actor and then call the ‘SetPrimitiveCompPhysics’ with ‘Simulate’ boolean set to false.

I’ve made the following addition to the TryRelease function, but unfortunately the behaviour has stayed the same. Unsure if I just handled this incorrectly or it truly has no effect on the problem.

Edit: Even if I disable simulate altogether without any condition, it still doesn’t teleport after having been grabbed.

In that case I would check if physics sim is disabled before the grabbing and if it’s enabled after. The behavior of the ShotCam actor is changing once it has been grabbed, so there must be something changed on the actor by the grab component.

is this a problem still cos i have similar problem and nowhere to find an answer

when i grab an actor i lose ability to change it’s location


its vr with widget umg and grab component inside cube i use vr pointer on button to check if it’s hovered