Kabanero Posted January 26, 2023 Posted January 26, 2023 (edited) Hello, everyone. How can I connect one object to another in VR? For example, insert batteries into a flashlight or plug in the socket. Found a similar mechanic in one of the demos where you have to put a wire in the fuse box, but I need both objects to be movable and hold them in your hands. Thank you! Edited January 26, 2023 by Kabanero
silent Posted January 27, 2023 Posted January 27, 2023 Kabanero That's very interesting and complex task in case of VR especially. We never did such motion before, so it would be hard to provide a ready-to-use code that you can simply copy and paste into your project. However, you can experiment with a different approaches and maybe come up with your own solution. Here what we think may work: Connect objects via FixedJoint and somehow configure it so it would act normally with any mass and object shape. When you need to insert batteries from hand to flashlight simply switch parent of the object. It would be very simple solution with a visible jump in animation, but may work in some cases. Animate batteries via skinned animation when position of the object match the initial animation frame. So instead of actually inserting something you just play the predefined animation of this action. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts