Skip to content

Fix: Refactor of click target feedback #569

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

Merged
merged 3 commits into from
Mar 17, 2022
Merged

Conversation

jilfranco-unity
Copy link
Contributor

@jilfranco-unity jilfranco-unity commented Mar 17, 2022

Description (*)

A bug fix turned refactor of the player click feedback target. Before, it was a particle system with a single plane mesh particle being scaled over life, just following the cursor's position every 20 frames. Now it is a quad with a snazzier scaling animation and interpolated following of the cursor, to create a smoother, more seamless look and feel.

Fernando and I worked together on the interpolation, and part of the change was increasing the frequency of raycasts slightly for a smoother feel, let me know your thoughts on that for balancing performance and smoothness!

The red dot bug was seemingly an issue with the GPU dynamic instancing that particle systems use--it appeared with instancing turned on, and didn't with instancing turned off. It happened on every platform, in builds, and in editor, which further points to it being a weird bug with particle systems. I tried to debug with RenderDoc, but couldn't manage to capture a frame with the red dot, even using tricks like capturing multiple sequential frames--it only ever captured it rendering correctly. There were even times where both the red dot and the green target seemed to be rendering on the one particle mesh, which I think shouldn't be possible? I'd like to do some more digging into this, but for GDC and develop for now, implementing it in a different way feels like the way to go.

Here are some videos of the difference!

Before:
https://user-images.githubusercontent.com/89089503/158853365-4986097e-c463-4ac6-af39-ef7f711aa2ac.mp4

After:
https://user-images.githubusercontent.com/89089503/158853408-fb1122a9-0592-45ba-aab2-327e28418616.mp4

Issue Number(s) (*)

Jira ticket 2456 here

… system to fix the red dot issue, has a nice little animation and some position lerping to make it follow the player's cursor nicely
@jilfranco-unity jilfranco-unity changed the base branch from main to release/GDC2022 March 17, 2022 16:55
@jilfranco-unity jilfranco-unity changed the base branch from release/GDC2022 to develop March 17, 2022 16:55
@jilfranco-unity jilfranco-unity marked this pull request as ready for review March 17, 2022 17:10
@jilfranco-unity jilfranco-unity added 1-Needs Review PR needs attention from the assignee and reviewers type:bug Bug Report GDC-cherrypick labels Mar 17, 2022
@pdeschain pdeschain added 3-Good to Merge and removed 1-Needs Review PR needs attention from the assignee and reviewers labels Mar 17, 2022
@jilfranco-unity jilfranco-unity merged commit 107af0f into develop Mar 17, 2022
@jilfranco-unity jilfranco-unity deleted the fix/red-dot-on-click branch March 17, 2022 17:59
jilfranco-unity added a commit that referenced this pull request Mar 17, 2022
* Refactor of how the click target feedback works--no longer a particle system to fix the red dot issue, has a nice little animation and some position lerping to make it follow the player's cursor nicely

* Minor change to simplify code a bit

(cherry picked from commit 107af0f)
SamuelBellomo pushed a commit that referenced this pull request Mar 17, 2022
* Refactor of how the click target feedback works--no longer a particle system to fix the red dot issue, has a nice little animation and some position lerping to make it follow the player's cursor nicely

* Minor change to simplify code a bit

(cherry picked from commit 107af0f)
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.

3 participants