How to set the distance between the camera and a grabbed object

Hi,

I’m trying to implement a simple grab system where you press a button and an object is picked up gravity gun style.
Everything is working well however I would like the object to hover closer to the camera than it is right now.

Unfortunatly i haven’t been able to do so.

Any Pointers ?

Here is the implementation I followed UE4 - Pick up an Object - Unreal Engine 4 Blueprints Tutorial - YouTube

Hmm I tried that, it only changes the distance for on frame and then springs to the fixed distance right away

I just watched the video and you can easily adjust the distance. In the video he does ‘First Person Camera - Get Forward Vector * 300’. If you just change the 300 to a smaller number, the object you grab will be closer to the camera.

I did find a small mistake in the video and posted it in the comments.

He didn’t link the Branch, it is always true and therefore you can get an error message if you press the E
but you were too far away to grab something. Just link the branch with the ‘LineTraceByChannel Return Value’
so that it works completely.

1 Like

I think that’s because of a collision.
Try to change some things in the Physics and Collision tap.

I would turn off ‘Can Character Step Up On’ and see what happens if you change ‘Collision Presets’ so that everything is set to ‘Overlap’.

I’ve tried it by changing the collision response channel. to ignore the pawn.
When i press the object against a wall a run to it i can see that the collision is turned off.

Furthermore if I increase the value from 300 to 10 000 for example as soon as i grab the object it teleport very far in front of my but quickly springs back to the same distance from the camera.