I’m trying to pick up a basketball using the mouse pointer. I trace a line from the camera through the pointer world location and check if it hits my ball, if it does, I call the ‘grab component at location’ function and set the grab location to the mouse world location plus a small offset so the ball won’t be held directly in front to the camera.
Then, on every tick, I update the location to the mouse world position plus said offset.
The desired behavior is that the ball will follow closely after the cursor(So I could throw it into a basket). However, the behavior I’m getting is the ball is almost tied with a string to the cursor. I want to figure out how can I control the length of this imaginary string, so I could shorten it and have the ball follow the cursor more closely.
Here is how it currently looks:
Here are the relevant blueprint sections:
I tried playing with the exposed variables of ‘Physics Handle’ such as ‘Linear Damping’ and ‘Angular Damping’ yet no matter what values I put in there it doesn’t seem to affect the distance between the ball and the cursor. I tried plugging in a really high number at ‘Interpolation Speed’ and it didn’t seem to affect anything at all.