When moving (drag) an object using the cursor, all the coordinates of the object change.
You need to add a property that allows you to move the object without changing the Z coordinate of the object.
I sort my objects by Z. When I move an object with the cursor, I want to raise the object above others by the Z coordinate. Now the cursor script does not give it because of "go.set_position(pos - self.state.pressed_offset, self.state.pressed_id)".
Now I have to write this way:
"local set_pos = pos - self.state.pressed_offset
go.set(self.state.pressed_id, "position.x", set_pos.x)
go.set(self.state.pressed_id, "position.y", set_pos.y)"
When moving (drag) an object using the cursor, all the coordinates of the object change. You need to add a property that allows you to move the object without changing the Z coordinate of the object. I sort my objects by Z. When I move an object with the cursor, I want to raise the object above others by the Z coordinate. Now the cursor script does not give it because of "go.set_position(pos - self.state.pressed_offset, self.state.pressed_id)".
Now I have to write this way: "local set_pos = pos - self.state.pressed_offset go.set(self.state.pressed_id, "position.x", set_pos.x) go.set(self.state.pressed_id, "position.y", set_pos.y)"
Thank you for the great asset!