Getting 2 objects to stick to each other in VR

How can I get 2 objects to stick together in a specific manner when they overlap in VR?

Depending on what you are trying to do you can attach a static mesh component to another static mesh component or a static mesh actor to another actor using the respected nodes.

Unreal Engine Tutorial Lesson 8 Attaching Actors & Components (youtube.com)

This tutorial is a little old but it should give you the just of the thing your trying to do.

1 Like

Hey there @Pranmudri123! Welcome to the community! My first recommendation matches Uno’s, in that using component/actor attachment you can “stick” objects together, even with specific socket locations if need be. This method basically statically links the two objects, so if that fits your use case, that’s perfect. If you need them to have some other physical interaction between links (for example a chain/rope or a hinge) you’d look into Physics Constraints.

Actually what I’m trying to do is build a VR game where I can pick up 2 different pieces, and when they are brought together, they snap in place. I will attach a blueprint of what I’m doing. Note this blueprint only works if the parent piece is brought to the child piece. When the parent piece attaches to the child, I can pick up both pieces and move them together. However, if the child piece were to be brought to the child will definitely stick at first, but by making the child static, I would essentially freeze the child piece in place and only be able to move the parent. My intention is regardless if the child is brought to the parent, or parent is brought to the child, both pieces can be stuck together permanently and me movable together permanently. Also, it seems that I’m unable to open up the blueprint to show you what I’m doing.

As you can see here the Body6 is the parent and it snaps to the child which is vase part. After that I make the child static.