I am trying to move a Group of nucleotides using DragControls. After moving, I want to export the new positions of each nucleotide with its base, connector, and backbone and then reload it into a new window. Because moving a Group does not update its children’s position, the positions I export do not reflect the changes I made. How do I fix this?
Thank you for all of your help.
object.position represents the local position of an object. Use Object3D.getWorldPosition() to get the position vector in world space.
When I use the Object3D.getWorldPosition() method, for some reason the output does not match the input. Is there any way I can check it is doing what I mean it to do or whether the problem is due to the subsequent calculations?
Can you please proof this with a simple live demo? Otherwise it’s hard to comment your post.
https://github.com/sulcgroup/oxdna-viewer/tree/dev has the version without using world position and only updates the position in the output file if individual objects are moved and not if nucleotide groups, strands, or systems are moved.
The following are sample files to test the viewer.
sim.top (172 Bytes)
last_conf.dat (2.8 KB)