Lales.Charles Posted February 25, 2021 Share Posted February 25, 2021 Dear Unigine support, I try to use the handle property / ObjHandle component from demo VR but with articulated arm. The question is probably basic, but how can I change the pivot point position relatively to the node, in this case directly object mesh static? For example, this first node turns fine constrained on Y axis: but this second node constrained on Z doesn't keep contact with previous one since it turns around a pivot not properly placed. Kind regards, Charles Link to comment
silent Posted February 26, 2021 Share Posted February 26, 2021 Hi Charles, We do no recommend to use ObjHandle for this task. Probably, it would be easier to use joints and simply transform the bodies via setTransform. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Lales.Charles Posted February 26, 2021 Author Share Posted February 26, 2021 Hi, I should have detailed it a bit more... We do want to let the user interact with the different part, positioning automatically but under constraint (only rotation angle) the rest of the robot arm. Yes I saw tutorial how to setup articulated parts and make them animated.. but here, it has to come from user VR interaction. So.. we could have tried with intermediate nodes as we do already to animate helicopter rotors.. But in VR code of ObjHandle component, the init fail if we setup the prop on this intermediate dummy node without any rigid body... void ObjHandle::init() { obj = checked_ptr_cast<Object>(node); body = node->getObjectBodyRigid(); body->setFreezable(0); //ptr null if dummy node without rigid body [...] } I guess you see a bit more the issue. Feature suggestion (if not already existing): a way to move the pivot point related to its geometry. E.g. ctrl translaste on predefined grid, maj do a clone, alt translate node without children.. Another combination could let move the pivot and position it smwhere else on node geometry. Back to our need, would see smthg possible in Unigine? Otherwise it will be done outside, e.g. Blender... Kind regards, Charles Link to comment
karpych11 Posted February 26, 2021 Share Posted February 26, 2021 Hello, Try to replace: body = node->getObjectBodyRigid(); body->setFreezable(0); with: body = node->getObjectBodyRigid(); if (body) body->setFreezable(0); in ObjHandle.cpp. It worked for me. Also you can change the pivot point with Object Dummy and then export a new mesh. But I recommend changing it in any external tool. Link to comment
Lales.Charles Posted February 26, 2021 Author Share Posted February 26, 2021 Ok, thanks for analyze and suggestion. Link to comment
Recommended Posts