Search Unity

World Space Canvas click location

Discussion in 'UGUI & TextMesh Pro' started by Lord-Simpson, Sep 4, 2014.

  1. Lord-Simpson

    Lord-Simpson

    Joined:
    Mar 24, 2011
    Posts:
    10
    Hi
    I'm trying to set up what i think is a simple system, I want a world space canvas which when clicked sends the coordinates clicked to a script.

    What i have so far is a world space canvas covering the entire game world (8000,8000). I found out the canvases need some child object to receive the click, so i used a panel with a blank sprite.

    In my code i implemented the IPointerClickHandler interface and am dumping eventdata.worldposition to the debug log.

    I get a log but every time its 0,0,0 no matter the position clicked.

    Are there any other requirements to get this working?