Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Maxpilot |
For dragging a sprite I want to use “get_relative()” of an InputEventScreenDrag, but value is always (0, 0). This should be “Drag position relative to its start position”.
For now I use “InputEventScreenDrag.get_position” for positioning a sprite, something like:
newPosition = event.get_position
translate(newPosition - oldPosition)
oldPosition = newPosition
it works, but I tried:
translate(event.get_relative())
as it seems much more elegant, but this doesn’t work. What’s my error here?