Skip to content

Fix: Corrected Start() initialization in ShellCollision.cs - #105

Open
DJMikeLee wants to merge 28 commits into
developfrom
density-shell-raycast
Open

Fix: Corrected Start() initialization in ShellCollision.cs#105
DJMikeLee wants to merge 28 commits into
developfrom
density-shell-raycast

Conversation

@DJMikeLee

Copy link
Copy Markdown

Summary of Changes:

  • Corrected a lifecycle initialization typo (start() to Start()) in ShellCollision.cs.

  • This ensures the detectionRadius dynamically scales to the shell's actual size (0.5f * scale.x) instead of defaulting to 2.0.

  • Note: As discussed with Sonali on Discord, no changes were made to the Layer Collision Matrix to preserve the intended open/closed blocking behavior between UnitMass and DensityShell.

RatchevD and others added 28 commits October 27, 2024 22:59
Set up the Density Exploration Scene where I will be making all of the changes, and added in the beginning critical components such that it matches the other scenes.
Reorganized the scene (remade it by basically copying another scene and then deleting what I don't need), and then added the density shell (at least its preliminary nature) with a rigidbody component reflecting its starting mass
Created Multiple (3) Unit Masses that the player can interact with by dragging and dropping. They are however not yet organized. More can be easily made down the line or they can become a prefab as that becomes necessary.
Added a select layer which will be used to handle the trigger press on the density shell in hand controller.
Created Blue Material that the Density Shell will Change To When Selected (at least for now this indicates the shell being open or closed but will be removed when the animation is added)
Updated Hand Controller to Switch the Selected Value of an object with the "select" mask when it is clicked on
Added script to add onto an object that has the "select mask". This gives it a "selected" check box that can be accessed with a getter and a setter and is changed by HandController when the object in question is selected.
Created Script For the Density Shell That Takes Care of the Updating Material Process based on the value of the checkbox (which is updated by HandController). The boolean value can also easily be accessed through the SelectObject object.
Changes to Scene File to add in the new functionality
Current up to date apk file for testing progress
Added DensityShellAssets folder to hold all density shell related scripts/materials/etc.
Updated APK file with one that hopefully works on not just my computer :)
The shell now does not allow masses to enter it when it is closed, and does when it is open. The mechanics with snapping and closing with masses inside however are still not yet added
Added the functionality for snapping and unsnapping 3 masses. Currently this works for 3 masses as a test and I will now make it work for 8 masses.
Added the snapping and unsnapping mechanic for all 8 masses
Implemented a grid, made small improvements and changed mass values, and added the implementation for the drag and drop of the shell
Added script to handle the collision manually between the two shells since they both have isKinematic=true currently which means that their collision is not automatically handled.
Updated HandController to make sure the shell cannot be selected or unselected while its being held.
Removed using Trigger entry to detect masses in order to update the mass of the shells as it is much easier and less error prone to do so in DensityExploration by just checking the amount of snapped masses.
Added the second shell and reworked the density exploration script in order to work with both of these shells at once.
Updated Shell Collision script such that it can now be placed on all shells rather than just the one shell. Accordingly, I updated the scene to place it on the other shell.
Updated APK with new changes
Fixed bug where mass teleports out of shell when it is closed. This occured when dragging a mass from one open shell directly into the other and then closing the shell.
Moved ShellCollision into the DensityShell Assets folder.
Cleaned up DensityExploration documentation and added summary of the class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants