Pivot Point with parts to handle with constraints


Recommended Posts

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,

Link to post


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,

Link to post


Try to replace:

	body = node->getObjectBodyRigid();


	body = node->getObjectBodyRigid();
	if (body)

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 post