Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix drawing slider with touch inserts a random control point at beginning #28870

Closed

Conversation

frenzibyte
Copy link
Member

As can be seen in the video attached in #26509 (comment), when drawing a slider after touching the playfield, a control point is inserted at the point where the user put their finger before drawing.

This is caused by SliderPlacementBlueprint reading the snap result of the last frame instead of the current frame where the touch input was triggered, therefore beginning a curve with the old mouse position.

The solution in this PR might not sit well with everyone because it's essentially a schedule underneath a three-line comment block, but I would like to say that the flow at which the blueprint receives the snap result warrants a schedule so that the placement begins with the snap result constructed based off the current update frame.

Note that PlacementBlueprintTestScene required a refactor so that the solution works. While this might feel like the solution is flaky, PlacementBlueprintTestScene was written in a way that operates opposite to how the editor naturally works. By that I mean the test scene updates the snap result before the test input manager's update flow, so even if beginCurve is scheduled in the mouse event, it'll execute before the next snap result update (in other words, the snap result update flow in the test scene always reads the input state of the last frame)

@frenzibyte
Copy link
Member Author

Blocked pending further changes for the PR to fully do its job.

@bdach
Copy link
Collaborator

bdach commented Aug 27, 2024

Is this still blocked?

@frenzibyte
Copy link
Member Author

Not complete yet, will unblock when it's good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants