TransformableNodes and translations issues
Hi,
I've been concerned with the following situations :
I'm having a TransformableNode with child nodes. Each child node corresponding to a renderable. The TransformableNode is well displayed and each child node position is right. When I try to scale or rotate the Node it works and every child are modified accordingly. But it is impossible to translate that TransformableNode (more exactly its child won't move).
Concerning the translation, I came across another problem. I have one anchor. On that anchor, multiple AnchorNodes are created. Each AnchorNode has a TransformableNode as child which got a renderable. The first time (and only the first time) that I select then translate one of those TransformableNode, all others TransformableNode linked to that Anchor become disabled. That happens only with translation, rotation and scale work fine.
Are those behaviours known / supposed to be ?
For the first situation (TransformableNode with childNodes):
I suspect that the reason you can't translate the TransformableNode is because it doesn't have a collision shape. To be able to detect when you are dragging the TransformableNode, it must have a collision shape. By default, this comes from the attached Renderable, however if only the child nodes have Renderables then it won't have a collision shape. There is an improvement in an upcoming release where the collision shapes of the TransformableNode's children will work for translating the TransformableNode. Until then, you can set the collision shape of the node yourself.
node.setCollisionShape(new Box(new Vector3(0.2f,0.2f, 0.2f), new Vector3(0.0f, 0.1f, 0.0f)));
For the second problem, it is currently required that each TransformableNode has its own ARCore Anchor. When you finish Translating a TransformableNode, it detaches the old anchor and creates a new anchor at the new location. If other TransformableNodes are using the old detached anchor, they will disappear because that anchor is no longer being tracked.
Closing due to inactivity.