Search Unity

  1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

How do you attach a canvas to a quad (or should i not?)

Discussion in 'Getting Started' started by mrgreaper, Aug 12, 2017 at 9:25 PM.

  1. mrgreaper

    mrgreaper

    Joined:
    Aug 6, 2017
    Posts:
    6
    I am just starting in unity and have done the roll-a-ball and space shooter tutorials (very handy and well made tutorials, although the latter really needs to be remade to factor in the changes to unity 5 lol)
    What i am trying to do is have a page floating above a desk that will have writing put on it via a script (not my end goal but once i learn this i can go from there)
    i have a plane as the desk with a wood texture
    I have a Quad as the page with a paper texture
    camera is over head and in game view i can see the page, the table (the pages shadow)
    all is good.
    i go to add my text element, this adds the canvas
    i make the canvas render in world space
    i make the canvas a child of the page (the quad)
    i reset it to origin
    i reset the text to origin

    and this is where things start to go wrong, if i press f to focus on the text i see it is massive! way beyond 1 meter by 1 meter and certainly far too big for a page. (size really matters here as eventually this will be in a vr app)
    as i shrink the text down it blurrs
    it does not seem attached to the quad in any way shape or form

    Googling for a solution has got me no where and to be honest i am not sure if i am approaching this in the right way (though the description of quad says its for UI surfaces on one of the pages i looked at (looked through so many before posting that i can not remember which)

    Any suggestions would help no end thanks in advance.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    5,394
    You're on the right track. You just need to fiddle with the canvas resolution. Please read over this manual page on Creating a World-Space Canvas; I bet you'll find what you need there.
     
    mrgreaper likes this.
  3. mrgreaper

    mrgreaper

    Joined:
    Aug 6, 2017
    Posts:
    6
    Thank you, that pointed me in the right direction, still took about an hour and the text looks crystal clear in the preview screen but a little blurry in the game screen (minor issue)

    i made canvas with a resolution of 800x600
    adjusted the scale to fit my paper (0.0017 for example, those canvases are HUGE!)
    added a text element (set its resolution to 800x600)
    I raised the canvas by 0.001 so the text was not in the page (looked fine from above at 0 but as you moved it you could see clipping)
    told the text to do the best fitting and used my forum post as test text :)
    works a treat thank you!
     
    JoeStrout likes this.