Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

[HELP] How to draw Beziers?

Discussion in 'Project Tiny' started by Eulenmensch, May 2, 2019.

  1. Eulenmensch

    Eulenmensch

    Joined:
    Mar 10, 2018
    Posts:
    19
    Hi!
    I found Bezier maths within the ut modules but nothing to draw the curve on screen. Is there some way to just draw pixels at points or something else to visualize the bezier curve?
    Thanks in advance :)
     
  2. Rupture13

    Rupture13

    Joined:
    Apr 12, 2016
    Posts:
    131
    The bezier math in the modules is for adding a curve in a component (like in regular Unity an AnimationCurve) which you can evaluate at points.

    It's not meant to draw, and there's no Tiny code to draw pixels in lines or anything.
     
    Eulenmensch likes this.
  3. Eulenmensch

    Eulenmensch

    Joined:
    Mar 10, 2018
    Posts:
    19
    Oh, okay. Thank you so much for your reply!
    Would I need to create my own code for beziers then if I wanted to render one?
     
  4. Rupture13

    Rupture13

    Joined:
    Apr 12, 2016
    Posts:
    131
    Yes, but you're probably going to want to use JavaScript for that instead of trying to do it with Tiny stuff.
    It would probably be rather difficult to do and make it perform nicely, so I'd reconsider if you really need it.
     
    Eulenmensch likes this.
  5. Eulenmensch

    Eulenmensch

    Joined:
    Mar 10, 2018
    Posts:
    19
    I'm thinking about just making a spritesheet and faking the desired effect or using the physics that I'm implementing to actually simulate what I originally tried to fake with the beziers. You have been very helpful, thank you!