My two bits on the subject

So, the grabbing system should obviously be a component. That way, I can apply it to anything I want down the line. As for how it works, it should be relatively simple: when the player mouses over a grabbable object, it will gain a bright outline. Then, if the player approaches it, and mouses over it, they can press E to grab it, and press E again to drop it.

As for how that would work, obviously, the object would first have to become a physics object. I’ll bet Unreal has a pre-built component for that. Then, when the player grabs it, The object is locked in place relative to the player (at which point it stops acting like a physics object. Ideally, however, it would still have a momentum vector, so that if the player swings the mouse and presses E mid swing, they can throw it.)

When E is pressed again, the object stops being locked to the player, and becomes a normal physics object again.

At least, that’s how I presume all the fancy games do it.

Privacy & Terms