Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    [3D]CreateObjectGroup() + setObjectParent() => initial position multiplied by 2 ?!

    Beginners
    5
    14
    715
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • vincent2105
      vincent2105 @pianofire last edited by

      @pianofire Thank you ! I hope it will be fixed !

      pianofire 1 Reply Last reply Reply Quote 0
      • pianofire
        pianofire Fuze Team @vincent2105 last edited by

        @vincent2105 Do you have a work around?

        If you do I would put a flag on it in case it is fixed in the future

        bool issue = true
        
        if issue 
          // Adjust initial positions because of bug
        endif
        
        vincent2105 1 Reply Last reply Reply Quote 2
        • vincent2105
          vincent2105 @pianofire last edited by vincent2105

          @pianofire No, i'm just discovering for the moment. I plan to program a space game, where you can travel from a planet to another and things like that. :)

          1 Reply Last reply Reply Quote 1
          • Dave
            Dave Fuze Team last edited by Dave

            This is certainly a bug. Setting the parent of an object should not affect its position - only the origin point of rotation and translation. Thanks for reporting @vincent2105!

            EDIT: This has been looked into and there is now an better explanation of how things should work here:

            https://fuzearena.com/forum/topic/1920/createobjectgroup-explanation

            1 Reply Last reply Reply Quote 1
            • Kat
              Kat Fuze Team last edited by Kat

              To work around it for now you could set up any object groups with an origin of {0, 0, 0} and change the position of the group afterwards. So in your example program if you place the cube at {0, 0, 0} and the sphere at {0, 0, -30} then after creating the group add setObjectPosition(linkedObject, {10, 0, 30}) I think that would give you the position and behaviour that you had been expecting.

              1 Reply Last reply Reply Quote 2
              • vincent2105
                vincent2105 last edited by

                Thank you Dave and Kat !
                Hope to show you an interesting program someday !

                1 Reply Last reply Reply Quote 2
                • Dave
                  Dave Fuze Team last edited by

                  @vincent2105 You are very welcome! I am excited to see the program when it's ready!

                  1 Reply Last reply Reply Quote 1
                  • vincent2105
                    vincent2105 last edited by

                    In fact, I'm not sure what type of game I want to program... Maybe a city builder...

                    1 Reply Last reply Reply Quote 0
                    • Dave
                      Dave Fuze Team last edited by

                      @vincent2105 We've been looking into this and there has been some misunderstanding. Please take a look at the post I've done about object groups, it should be quite helpful!

                      https://fuzearena.com/forum/topic/1920/createobjectgroup-explanation

                      1 Reply Last reply Reply Quote 2
                      • vincent2105
                        vincent2105 last edited by

                        Thank you for taking the time for the explanations, it's very clear, indeed, I did not have the right approach.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post