Getting point and normal from viewport.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/08/2012 at 08:46, xxxxxxxx wrote:

    Hi!
    I'm looking for a way to get a point on a surface (including the respective normal) by clicking in the view port.
    The only possible solution I've discovered so far is to use the GeRayCollider class, but I'm having a hard time calculating the vector of the ray that would hit the object exactly at the position of the 2D mouse coordinates.
    I'd also have to specify which object I want to check for collision and ideally the method would work on what ever object sits at the position of the mouse click (could possibly be solved by iterating trough all objects of the document).
    Are there any other possibility that I don't know of? Maybe some talented person here on the forum can help me out with a code snippet or some words of wisdom. :)


Log in to reply