-
Notifications
You must be signed in to change notification settings - Fork 71
Debug shot component #454
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
Debug shot component #454
Conversation
vpe-ballshooter.mp4Sweet! |
|
This is great! Why was it not merged? |
|
I'm not sure, I think I wanted to update something before merging. I'll try to free some time this week-end for this and all your other PR. Again, apologies! |
Good luck! I am glad to see this is not dead. If you need help, I may rtemember a thing or two :D. See you! |
164b22c to
8cecb0b
Compare
|
Slipped in the new switch animation component as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the new Debug Shot component ported from UP2, adding functionality for creating ball shots via mouse interactions and keyboard shortcuts. Key changes include initializing default drag points in TriggerComponent, adding a SwitchAnimationComponent for switch animations, and introducing new ball shot management and debug components to support shot creation and reshooting functionality.
Reviewed Changes
Copilot reviewed 9 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| VisualPinball.Unity/VPT/Trigger/TriggerComponent.cs | Initializes default drag points for improved trigger behavior. |
| VisualPinball.Unity/VPT/Trigger/SwitchAnimationComponent.cs | Introduces switch animation logic based on trigger events and animated transitions. |
| VisualPinball.Unity/VPT/Ball/BallManager.cs | Adds a method to find the nearest ball from a given position for shot determination. |
| VisualPinball.Unity/Physics/Physics.cs | Provides an overload for retrieving local-to-playfield matrix using a Transform. |
| VisualPinball.Unity/Game/BallShotComponent.cs | Implements the debug shot creation and launching mechanics. |
| VisualPinball.Unity/Game/BallRollerComponent.cs | Refactors ball control to inherit from the new BallDebugComponent and adjusts cursor logic. |
| VisualPinball.Unity/Game/BallDebugComponent.cs | Adds common debug functionality and unified cursor position lookup. |
| VisualPinball.Unity/Common/Handles2.cs | Introduces helper methods for drawing gizmo arrows in the editor. |
| VisualPinball.Unity/VisualPinball.Unity.Editor/Utils/Icons.cs | Updates icon lookups to support the new ball shot component. |
Files not reviewed (4)
- VisualPinball.Unity/VisualPinball.Unity/Common/Handles2.cs.meta: Language not supported
- VisualPinball.Unity/VisualPinball.Unity/Game/BallDebugComponent.cs.meta: Language not supported
- VisualPinball.Unity/VisualPinball.Unity/Game/BallShotComponent.cs.meta: Language not supported
- VisualPinball.Unity/VisualPinball.Unity/VPT/Trigger/SwitchAnimationComponent.cs.meta: Language not supported
This PR concern the new tool component that I ported from UP2: the debugshot component.
It complement the BallMoverComponent to create a shot from a mouse click+drag+release which takes the nearest ball, destroy it, create a new one and send it in the given direction with force proportionnal to the segment length.
Hitting "Space" can reshot the last entered shot without using the mouse, and holding "control" when releasing mouse will create a new ball instead of deleting the closest one...