Search Instagram Twitter Facebook Spotify Grid Tag Date Folder Chat Pencil

Object Carry Improvement

Ok, I did not rewrite the object carry system again. However, I did add a small tweak that I think has improved it.

Problem

I noticed that with the spring method, because of the way the spring force works, the box doesn’t always end up in the center of the player’s view. Look at the gif below, notice how the box is often not directly in the center of the reticle. This is especially noticeable when you’re lifting the box up.

This is very different than when you’re using the raycast method, where the box is aligned exactly to the reticle. Like this:

The difference is slight, but even if you don’t notice it consciously, you can feel that the carry method has switched.

Solution

What I did was when you’re using the spring method, I calculate the difference between the current position, and the ‘ideal position’, which is centered on the reticle.

Then I apply a small force to move the box towards the ‘ideal position’:

I don’t make it super precise, because I still want the spring bouncy feel to it, but I think it is an improvement.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.