16
Support / Re: Can't set rotation of child corresponding to picked polygon if parent is rotated
« on: May 20, 2020, 11:42:30 pm »
Yes! Thank you Egon, the result is just fabulous
I made it with the following code..
You saved my game, really big thanks to you.
Regards, M
I made it with the following code..
Code: [Select]
SimpleVector touchPoint = Interact2D.reproject2D3DWS(cam, fB, (int) x, (int) y);
float distance = theSphere.calcMinDistance(camPos, touchPoint, 1000);
SimpleVector pickedCoordinate = theSphere.mPickedCoordinate;
pickedCoordinate.matMul(theSpehere.getWorldTransformation().invert());
Object3D cube = Primitives.getCube(5f);
theSphere.addChild(cube);
cube.translate(pickedCoordinate);
world.addObject(cube);
You saved my game, really big thanks to you.
Regards, M