I have a controller (a PS Move controller in fact) with a position, pointing direction and orientation. Right now, I'm trying to point at an object in my scene and click a button to pick it up. The ray test is set up, but I can't seem to implement the picking up correctly. I have two rigid bodies, controllerRB and pickingRB (both kinematic). When I click the button, I translate the pickingRB to the position of the object I want to pick up. Then the vector between controller and object is calculated and in every frame, the pickingRB's position will be updated if the controllerRB moved or I manually change the distance between the objects. This should drag the object in the correct position. The controller direction is not yet taking into account.
Somehow, when I click, the object jumps away a little and then returns to the correct position.
So, I'm coming to the conclusion, that I've been going about this all wrong, because I'm not really an expert on bullet.
I thought, putting an object at a certain position and orientation would be a piece of cake, but obviously I failed^^
How would you guys implement this?