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

start of adding touch input #1898

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Conversation

Pyrdacor
Copy link
Contributor

Summary of the PR

This adds touch devices to the input abstraction. The goal is to add touch gesture recognition to the SDL backend to enable touch gestures and simple touch finger events on Android and iOS.

Related issues, Discord discussions, or proposals

I proposed this a long time ago and finally found some time for it.

@Perksey
Copy link
Member

Perksey commented Jan 14, 2024

I proposed this a long time ago

Where?

@Pyrdacor Pyrdacor requested a review from a team as a code owner January 14, 2024 23:05
@Pyrdacor
Copy link
Contributor Author

I proposed this a long time ago

Where?

On discord. But my memory was poor. It was more a question and you said I can give it a try. I guess I started to work on this a bit later but then abandonded it because of time.

image

@Perksey
Copy link
Member

Perksey commented Jan 14, 2024

Thanks

Comment on lines 23 to 36
/// <summary>
/// The last known normalized position of the finger.
/// </summary>
public Vector2 NormalizedPosition { get; }

/// <summary>
/// The last known speed of the finger.
/// </summary>
public Vector2 Speed { get; }

/// <summary>
/// The last known normalized speed of the finger.
/// </summary>
public Vector2 NormalizedSpeed { get; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could there be some documentation in here about what normalized means in this specific context? In the case of graphics programming this could very well mean -1 -> 1 or 0 -> 1

Copy link
Contributor Author

@Pyrdacor Pyrdacor Jan 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added (0..1) and (-1..1). Is this enough? In general positions are normalized to range 0 to 1 and speed values to range -1 to 1 as they have a direction. I tried to add this information everywhere before but forgot it here I guess.

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

Successfully merging this pull request may close these issues.

None yet

3 participants