Of course you can use linepick and pickables and a physics system at the same time. By "pickables" i mean the low details meshes, that you will pick (which can be not rendered by setting their alpha to 0)
If you want to pick a physics body, the idea is to use the same low details shape for the body and for the pickable, for example you could have the physics engine update the behavior of the body and then either set this mesh as pickable, or position rotate another low details mesh (the same shape) (with alpha 0) at the same position with the same orientation.
The linepick is a vector with a start point and a direction and a length, and the result of the pick will give you the picked point and the picked normal (if something is picked). With these infos, you can add a force to the body which corresponds to the vector direction and length. (or you can only use the direction and add the force you want, hence the usefulness of a normalised vector)
I know that with Bullet physics system there are some functions to add a force, and there are also some functions to cast a ray (which probably will give you the same results than linepick)
Open the decls file with a text file and you can see all the functions... search for "Ray" "Force"
|