Forum Discussion

hippiechicken12's avatar
9 months ago

Rotate objects using codeblocks

Hey everyone! I know how to rotate a single object using codeblocks, but I need a little help. I am looking to rotate one object around another. How do I do that? I’ve tried spin in local space and son relative to an object but it didn’t work. Was I using it wrong? Any help is appreciated! Thanks in advance! 

3 Replies

  • The 2nd object needs to be grouped with a longer invisible object so that it has a different axis so it can go around the 1st object. (I think that’s how it’s described). I was going to write it all down here for u but it’s a lot of words. Give me a little bit and I’ll make a tutorial of how I would do it. 

      • Kayrrie's avatar
        Kayrrie
        Partner

        I don’t see where I can add the clip I did. 
        You have to create a new center point with an invisible cube and have the object you want spinning around the other object grouped to it. Make sure that center point of that invisible cube is aligned with the center of the 1st object. Then attach your rotating script to the 2nd grouped objects and it’ll rotate around the first. I hope that makes sense. I did a short video but it won’t let me post it here. If you still need help and feel comfortable, you can add me to your world or even a blank world and I’ll show you how to do it.