https://linen.dev logo
Join Discord
Powered by
# lime
  • h

    hallowed-ocean-84954

    05/11/2023, 1:43 PM
    Oh I didn't realize this - lime's Matrix4 is an abstract over Float32Array - nice
  • t

    tall-teacher-57409

    05/11/2023, 1:43 PM
    seems accurate to me, I'll try it now.
  • t

    tall-teacher-57409

    05/11/2023, 1:43 PM
    yep
  • h

    hallowed-ocean-84954

    05/11/2023, 1:45 PM
    What's really hilarious is that openfl.geom.Matrix3D also has a pointAt(). Never knew that and wrote my own - ooops.
  • t

    tall-teacher-57409

    05/11/2023, 1:47 PM
    lol happens
  • t

    tall-teacher-57409

    05/11/2023, 1:52 PM
    yesh its working!
  • t

    tall-teacher-57409

    05/11/2023, 1:52 PM
    thanks
  • h

    hallowed-ocean-84954

    05/11/2023, 2:00 PM
    Nice! Another thing I can convert
  • t

    tall-teacher-57409

    05/11/2023, 2:20 PM
    how do you get user input and attach callbacks when triggered
  • t

    tall-teacher-57409

    05/11/2023, 2:21 PM
    I find ^, but no idea how to call functions when that event gets fired

    https://cdn.discordapp.com/attachments/769686258049351722/1106224549147725824/image.png▾

  • h

    hallowed-ocean-84954

    05/11/2023, 2:41 PM
    Use OpenFL 🙂 Actually there's a lime sample on input handling -
  • t

    tall-teacher-57409

    05/11/2023, 3:05 PM
    ah didn't see that, well idk about openfl, I'm not a fan of it 😕
  • t

    tall-teacher-57409

    05/11/2023, 3:16 PM
    wait is it possible to do add/subtract/multiply vectors with floats?
  • t

    tall-teacher-57409

    05/11/2023, 3:16 PM
    .add/.subtract..etc take Vector4 as params
  • h

    hallowed-ocean-84954

    05/11/2023, 3:25 PM
    I don't know if the api supports it but it is mathematically defined and glsl does support it.
  • t

    tall-teacher-57409

    05/11/2023, 6:26 PM
    do you have a function for that too ?
  • h

    hallowed-ocean-84954

    05/11/2023, 6:30 PM
    I tend to do that in shader code so I may not have a haxe function for it. Don't remember writing one.
  • t

    tall-teacher-57409

    05/11/2023, 6:33 PM
    ahh aight np, but I think its pretty simple, its just a scalar, so multiply the float by every i hat and j hat value in the matrix?
  • h

    hallowed-ocean-84954

    05/11/2023, 6:33 PM
    Right
  • t

    tall-teacher-57409

    05/11/2023, 6:33 PM
    🥳
  • t

    tall-teacher-57409

    05/11/2023, 6:36 PM
    also lime tbh needs operator overloading on vectors and matrices, I don't like using
    .add()
    and
    .subtract()
  • h

    hallowed-ocean-84954

    05/11/2023, 6:38 PM
    Abstracts could do it but I don't know how old that code is and when abstracts first appeared.
  • t

    tall-teacher-57409

    05/11/2023, 6:38 PM
    damnit, lime has a .scaleBy method 🤦‍♀️
  • h

    hallowed-ocean-84954

    05/11/2023, 6:39 PM
    I console myself with knowing that I learned how to do it myself when things like this happen
  • h

    hallowed-ocean-84954

    05/11/2023, 6:39 PM
    Which is often
  • t

    tall-teacher-57409

    05/11/2023, 6:39 PM
    true
  • t

    tall-teacher-57409

    05/11/2023, 6:42 PM
    Copy code
    hx
    case W:
                    cameraFront.scaleBy(camSpeed);
                    cameraPos.add(cameraFront);
    I think that will do it
  • h

    hallowed-ocean-84954

    05/11/2023, 6:42 PM
    Is this for zoom ?
  • t

    tall-teacher-57409

    05/11/2023, 6:43 PM
    moving forwards ig
  • h

    hallowed-ocean-84954

    05/11/2023, 6:44 PM
    I would just expect camera pos to update for dolly in out. And actually zoom would be done by fov changes iirc
1...128129130...138Latest