Home › Forums › Bug Reports and Feature Requests › Empties parented to an object do not report local position changes
- This topic has 3 replies, 2 voices, and was last updated 7 months ago by kdv.
-
AuthorPosts
-
2024-05-15 at 8:03 pm #74236xeonCustomer
OSX 14.5
V3D 4.7 P1
Blender 4.1
project and blend file located here:
https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:f2f27a4091/detect_object_in_object.zipTake any object and parent an empty to the object.
In my case I have attached an empty to the top of a cylinder and at a specific location just below the top of the cylinder. In Blender moving the cylinder the two empties follow as expected.In V3D 4.7.P1.
Using a when dragged over puzzle and a drag move set to the cylinder object. Set drag move mode to Z
Under the drag move puzzle…add a print to console and use the get Cylinder position Z.
Use a a similar print to console to get the Z positon of the Empty.Since the get object position is default local… the cylinder will report its position but the empty will not report any changes.
If the get object position puzzles are changed to World instead of local. The empties report their changes in position.
Desired outcome: we get local change values.
Attachments:
You must be logged in to view attached files.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-05-15 at 8:31 pm #74239kdvParticipantSince the get object position is default local
No, it’s not local. This puzzle returns coordinates in a parent’s space.
the cylinder will report its position but the empty will not report any changes.
The cylinder is a child of the scene (World). Its position in the scene’s space is changed. The empty is a child of the cylinder. Its position in the cylinder’s space is NOT changed, but it’s changed in the scene’s space (world’s space). It’s not an issue.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-05-15 at 11:01 pm #74244xeonCustomertrying to make sense out of what you stated. I am sure its right but I am not grasping it completely.
To test out the theory I updated the file so the cylinder is now parented to a cube.
Then I changed the on drag event to rotate.The parent cube is rotated but has its rotation applied so it has a different axis or orientation than the cylinder.
What I need is for the empty to provide me the distance its traveling relative to the cylinder.
However when the get position is returned…even after the object is rotated…it returns the same position even if it hasnt been rotated.Now…if you are saying that the empties are not going to change values because they are using the parent (the cylinders “space”) then I guess this makes sense and only world space coordinates will provide any information.
Is that the idea?
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2024-05-15 at 11:08 pm #74245kdvParticipanttrying to make sense out of what you stated. I am sure its right but I am not grasping it completely.
Just imagine a car with a driver inside. The car is moving, the driver is sitting still. But he is also moving. But he is sitting and not actually moving. Think about it.
Move objects in Blender and see their coordinates. Or look at my two screenshots with a little more attention…
only world space coordinates will provide any information.
Yeap. Plus logic and math.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
-
AuthorPosts
- You must be logged in to reply to this topic.