When user clicks, I want the bar will be falling slowly but it is still moving horizontally at unchanged speed.
I tried 2 ways and they doesn’t work as I expected
set_time_step will slow down the bar speed in both horizontal and vertical.
Change dy: I think about this way first but it has a problem when creating new bars. If user clicks and old bars slow down. Newly created bars will overlap each others because they has the same position. If all bars acquire input, there will be a warning message about input buffer.
This is my code
-- Move horizontally
local position = go.get_position()
position.x = position.x + self.dx * dt
go.set_position(position)
-- Move vertically
local position = go.get_position()
position.y = position.y - self.dy * dt
go.set_position(position)