[3D]CreateObjectGroup() + setObjectParent() => initial position multiplied by 2 ?!
-
@pianofire Thank you ! I hope it will be fixed !
-
@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
-
@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. :)
-
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
-
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.
-
Thank you Dave and Kat !
Hope to show you an interesting program someday ! -
@vincent2105 You are very welcome! I am excited to see the program when it's ready!
-
In fact, I'm not sure what type of game I want to program... Maybe a city builder...
-
@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
-
Thank you for taking the time for the explanations, it's very clear, indeed, I did not have the right approach.