Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Need help with rotating the sides of a Pyraminx for a Pyraminx simulator.

Discussion in 'Game Design' started by Kofiro, Nov 22, 2022.

  1. Kofiro

    Kofiro

    Joined:
    Feb 3, 2017
    Posts:
    29
    It's been about two weeks since I started working on this and I haven't been able to figure it out.

    Here's how a real-life pyraminx side is supposed to move:



    and here's how far I've gotten mine to move:
    https://media.giphy.com/media/4vslNT3Y9rRFed6OZU/giphy.gif

    So my basic ideas around this were to rotate the sides along the axes of the pieces at the tips. I managed to get the normal vectors of the faces along the pieces located at the tips and used one of those vectors as my rotation axis.
    Here's a look at the normal vectors:
    https://media.giphy.com/media/uN2LCAHZEbDOExE3Df/giphy.gif

    I also managed to get a tip rotating in the right direction, except the rotation was slightly off.
    Here's the tip piece rotating:
    https://media.giphy.com/media/sZU7kBwcJrhHzKREFe/giphy.gif

    If you look closely you can see the rotation is a bit wobbly as if the object isn't rotating around its center.

    Here's another video of a real life Pyraminx and the type of rotation I am trying to achieve:



    Thanks in advance.