-
Notifications
You must be signed in to change notification settings - Fork 53
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
Intake and Ejector Configurator #1017
Conversation
Need to merge transform gizmo code to add a sphere in the scene for implementation.
…hruv/1728/intake-ejector-config
…hruv/1728/intake-ejector-config
…into dhruv/1728/intake-ejector-config
private EnablePhysics() { | ||
this._mirabufInstance.parser.rigidNodes.forEach(rn => { | ||
World.PhysicsSystem.EnablePhysicsForBody(this._mechanism.GetBodyByNodeId(rn.id)!) | ||
}) | ||
} |
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.
Why is this a function, but disabling physics for all rigid bodies in the same way isn't? It's not an issue, I'm just curious.
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.
I added that to solve a bug so that is a good point and ill add that. The problem is that all of that stuff is from PR #1009 so I might need to wait for that to be merged
/** | ||
* Enabing physics for a single body | ||
* | ||
* @param bodyId | ||
*/ | ||
public EnablePhysicsForBody(bodyId: Jolt.BodyID) { | ||
this._joltBodyInterface.ActivateBody(bodyId) | ||
this.GetBody(bodyId).SetIsSensor(false) | ||
} |
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.
5 lines of comments, 4 lines of code. This is what programming's all about. To be honest, these functions are completely self-documenting without any comments.
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.
I don't even know why I did that but I do know its gone from #1009 😇
if (isDragging) { | ||
return | ||
} | ||
if (!event.value && !Array.from(this.transformControls.keys()).some(tc => tc.dragging)) { |
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.
Extracting this operation to a variable might be nice
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.
That is true it would be more optimized
…into dhruv/1728/intake-ejector-config
…hruv/1728/intake-ejector-config
need to fix bug of onCancel function not being run when another MainHUD panel being opened
@Ewie21 Preferences will be merged in first, then this branch, then finally Ayla's branch will have all the glue for everything. |
You could make it into a regular for loop and break, since all you'll do is set the same variables again. Also, could you just compare the ids directly, or are ids not consistent between Physics System and mechanism? I'm sure there are other things as well, but I haven't throughly read through the code yet. |
@Ewie21 This no longer exists. |
Note: Rigid node highlighting can be implemented once #1023 is merged in. |
I'm not sure when this was introduced, but opening the poker panel or settings modal throws this error. It might be anything that uses a slider.
|
@LucaHaverty Oops, I'll take care of it |
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.
Besides the slider things, I could not find any other issues, great work!
@@ -12,16 +12,15 @@ type SliderProps = { | |||
label?: string | |||
min: number | |||
max: number | |||
defaultValue: number |
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.
Perhaps this is the cause of the slider issues? Maybe due to a merge?
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.
@LucaHaverty could you look at that again and see if you can find errors with the fix
I didn't touch the ZoneConfigPanel because I don't want merge conflicts from your PR
Added changes to other files but ignored ZoneConfigPanel due to PR #1021 changing it
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.
Everything worked well, fantastic work!
if (isDragging) { | ||
return | ||
} | ||
if (!event.value && !Array.from(this.transformControls.keys()).some(tc => tc.dragging)) { |
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.
That is true it would be more optimized
@@ -12,16 +12,15 @@ type SliderProps = { | |||
label?: string | |||
min: number | |||
max: number | |||
defaultValue: number |
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.
@LucaHaverty could you look at that again and see if you can find errors with the fix
I didn't touch the ZoneConfigPanel because I don't want merge conflicts from your PR
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.
@Dhruv-0-Arora Are you not the author of this PR? Or did @HunterBarclay take this one over?
Hunter is the owner for this one |
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.
Works great! Just removed an unused import.
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.
Want to make sure @Dhruv-0-Arora 's comments are looked at before merge.
could you do gpAssoc?.isGamePiece
Originally posted by @Dhruv-0-Arora in #1017 (comment)
@LucaHaverty could you look at that again and see if you can find errors with the fix
I didn't touch the ZoneConfigPanel because I don't want merge conflicts from your PROriginally posted by @Dhruv-0-Arora in #1017 (comment)
That is true it would be more optimized
Originally posted by @Dhruv-0-Arora in #1017 (comment)
Description
Implementation of configuring the positioning of a robot's intake and ejector. Uses raycasting to detect the node (very basic implementation of detecting node) and saves the information. Allows user to scale the size of the sphere that spawns as well.
Features
Robot with configured pickup zone
Robot holding a Game Piece
Intake Configuration
Ejector Configuration
Temporary Components
These components are going to be left in and will be addressed shortly after in the scoring zone branch and likely one more branch to address input and behavior issues.
Warning
Merge after #1007
JIRA Issue