What if the walls are not straight?

Forum Archive What if the walls are not straight?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #21122
    Nathi Tappan
    Participant

      I must preface that this lesson just about melted my brain and the answer to my question might be right in front of me, but I feel like an amoeba rn.

      It all makes sense how to get rid of the velocity, and adding the math nodes to fake the direction with the stored positions, but what if the container was more complex?

      As in if we wanted to simulate the points bouncing inside of a random object, such as a sphere, or a Monkey head?

      There are a lot more faces, and I imagine there is a not-manual way to gather that information through nodes? 

      #98535
      Martin Bergwerf
      Participant

        HI Nathi,

        Not sure if Thom will check the questions on this Course, but collisions are hard to calculate, when Objects get more complex. With a Monkey Head, each Face would have to be considered  as a separate ‘wall’.

        A Sphere would be a lot easier than a Cube, it’s the simplest Object in 3D. Just a Point (the Center) and a Distance to that Point. The Normal of any Surface Point, is the Vector from that point to the Center.

        More Complex Objects can often be approximated by simpler forms:

        Collisions_00.png

        You can also combine things, like Distance to Center, but not Less Than Zero (for instance):

        Collisions_01.png

        Hope this helps a bit.

        #98536
        Nathi Tappan
        Participant

          Ha! For some reason I thought of the sphere as not smooth (all the tiny little walls/polygons that make it look smooth). But that’s a great point! It would indeed be just a matter of radius and normal. 🤔

          I’ll start there. Hopefully I can recreate the engine for spheres. Then maybe if my brain ever heals (lol) I can try more complex objects.

          Thanks Martin!

          ps. Thom, if you ever get to these questions, would love to hear your thoughts too.

          #98537
          sheila5
          Participant

            I think you have to add some math nodes in between then. There is awoman on YouTube that specializes in math for game mechanics, but i loose interest if it gets too complicated.

            https://www.researchgate.net/figure/Effect-of-incline-on-incident-angles_fig3_362021392

            https://youtube.com/@acegikmo?si=cYQUi5oRrcq75wrE

            #98538
            Nathi Tappan
            Participant

              Thanks for the recommendations! I hear you… I love Freya’s content, but most of the time it gets over my head.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • The topic ‘What if the walls are not straight?’ is closed to new replies.