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

    tall-teacher-57409

    05/11/2023, 6:45 PM
    aight
  • t

    tall-teacher-57409

    05/11/2023, 6:45 PM
    and btw what's in the inverse of scaleBy
  • t

    tall-teacher-57409

    05/11/2023, 6:45 PM
    if lime has something for that
  • h

    hallowed-ocean-84954

    05/11/2023, 6:46 PM
    Scale by less than 1. 1/ whatever you scaled by
  • t

    tall-teacher-57409

    05/11/2023, 6:46 PM
    so that's like subtracting?
  • t

    tall-teacher-57409

    05/11/2023, 6:46 PM
    wait no
  • t

    tall-teacher-57409

    05/11/2023, 6:46 PM
    nvm
  • t

    tall-teacher-57409

    05/11/2023, 6:48 PM
    ight time to test if that works
  • t

    tall-teacher-57409

    05/12/2023, 7:54 AM
    what 💀

    https://cdn.discordapp.com/attachments/769686258049351722/1106489638048247838/image.pngâ–¾

  • t

    tall-teacher-57409

    05/12/2023, 7:55 AM
    it's this cursed line
    Copy code
    hx
    view.pointAt(cameraPos, cameraPos.add(cameraFront), cameraUp);
  • t

    tall-teacher-57409

    05/12/2023, 7:56 AM
    but that's identical to the cpp
    Copy code
    cpp
    glm::mat4 view = glm::lookAt(cameraPos, cameraPos + cameraFront, cameraUp);
  • t

    tall-teacher-57409

    05/12/2023, 8:14 AM
    my only guess is that because
    add()
    operates on the matrix itself so when called, this also affects the first param of
    pointAt
    , notice how the cpp uses
    +
    and I think what I'm technically doing is
    +=
    , I hate this design of vector/matrix arithmetic
  • t

    tall-teacher-57409

    05/12/2023, 8:16 AM
    hmm I forgot about the second param of add, result, maybe setting this to null will fix it
  • t

    tall-teacher-57409

    05/12/2023, 8:19 AM
    bruh no nvm that's not the bug
  • t

    tall-teacher-57409

    05/12/2023, 8:25 AM
    hm now that's normal, it seems like setting cameraPos to 0.0, 0.0, 3.0 was why it looked weird, no idea how that explains anything but it works

    https://cdn.discordapp.com/attachments/769686258049351722/1106497429651603496/image.pngâ–¾

  • h

    hallowed-ocean-84954

    05/12/2023, 1:20 PM
    Were the camera position and the lookat target the same ?
  • h

    hallowed-ocean-84954

    05/12/2023, 1:32 PM
    One way to get really weird looking results is to put the camera inside one of the boxes. But your images don't look like that. But it looks like the one in looks like you are only see 3 faces and apparently from the inside - but it could be caused by other things too.
  • t

    tall-teacher-57409

    05/12/2023, 7:36 PM
    I think
  • h

    hallowed-ocean-84954

    05/12/2023, 7:58 PM
    Yeah that might give weird results. Now that it's working out would be easy to try out and see
  • t

    tall-teacher-57409

    05/13/2023, 6:56 PM
    https://gist.github.com/bwkam/5b77fbe2d4ed06ef88b001f3fc1ec720 any idea why camera movement no worky
  • h

    hallowed-ocean-84954

    05/13/2023, 8:04 PM
    In the W,S cases I clone the cameraFront and the scale and then add. In your case you are applying the scale directly to the cameraFront and then adding it. I would try cloning it. I think the case in the A, D cases the crossProduct() returns a new vector and you are not picking that up so you are applying the original value.
  • t

    tall-teacher-57409

    05/14/2023, 3:47 AM
    https://gist.github.com/bwkam/231da6ce0f80b16759b3f341d748bd56 ight ty, that makes sense so I cloned them as you said, but im not sure if my program's behavior is correct compared to the original one, one thing I notice is that the camera doesn't move smoothly as it does here: https://learnopengl.com/Getting-started/Camera
  • t

    tall-teacher-57409

    05/14/2023, 3:47 AM
    idk why is that
  • t

    tall-teacher-57409

    05/14/2023, 3:49 AM

    https://cdn.discordapp.com/attachments/769686258049351722/1107152656297902130/Peek_2023-05-14_05-49.gifâ–¾

  • h

    hallowed-ocean-84954

    05/14/2023, 4:17 AM
    what's your speed set to ?
  • h

    hallowed-ocean-84954

    05/14/2023, 4:18 AM
    is it moving in huge steps ?
  • t

    tall-teacher-57409

    05/14/2023, 4:22 AM
    2.5 * deltatime
  • t

    tall-teacher-57409

    05/14/2023, 4:22 AM
    exactly
  • h

    hallowed-ocean-84954

    05/14/2023, 4:41 AM
    Try a really small multiplier. I'm not familiar particularly with how lime key input works so you could be seeing tons of activations. Not sure.
  • h

    hallowed-ocean-84954

    05/14/2023, 4:42 AM
    oh - and what is deltatime ? is it a big number - being in say microseconds or something ?
1...129130131...138Latest