This package features a production-ready, highly optimized system built for modern game workflows. It leverages standalone vertex-driven vegetation animation alongside a modular interaction framework for multi-mesh object harvesting.
The Unity Input System: The included testing sandbox environment relies on Unity's modern UnityEngine.InputSystem. If your project uses the Legacy Input Manager, opening the demonstration environment will generate compiler errors.
Installing: Navigate to Window > Package Manager, select Unity Registry, search for Input System, and click Install. If prompted to restart the editor, select "Yes."
Opting Out: If you do not wish to use the new Input System in your project, you can safely delete the Demo_CameraController.cs script. The core runtime scripts, shaders, materials, and 3D assets carry zero external dependencies and will function perfectly without it.
Sandbox Navigation & Control
A comprehensive demonstration environment is included to let you test the interaction mechanics and wind simulation parameters directly in real-time.
Navigation Inputs
Action
Input
Look Around
Hold Right-Click + Mouse (or Gamepad Right Stick)
Move
W, A, S, D (or Gamepad Left Stick)
Altitude
E to fly Up, Q to fly Down
Speed Controls
Action
Input
Turbo Speed
Hold Left Shift
Adjust Base Speed
Tap the Home / End keys
Interaction Mechanics
Chop/Break: Position the crosshair over a compatible tree or rock asset and Left-Click (or press Gamepad West Button) to execute the harvest routine.
Range Safety: The interaction system verifies bounding radii; you must move within the configured interaction range to update the target asset state.
The Vegetation Wind System
The Nature Pack uses a specialized vertex shader displacement pipeline to simulate realistic foliage movement completely standalone. Rather than forcing scene management overhead or running heavy update scripts on the CPU, the animation cycles execute entirely on the GPU using native Unity time inputs.
System Architecture & Mechanics:
Zero Scene Dependencies: The wind system is entirely self-contained within the shader material. There are no manager prefabs or script components to maintain in your hierarchy, making the assets completely plug-and-play across any scene.
Dual-Wave Superposition: To prevent repetitive, mechanical "pendulum" movements, the shader combines a slow, broad macro-sway with a secondary, rapid micro-flutter phase. These asynchronous waves continuously distort each other to produce organic, non-rhythmic turbulence natively.
Procedural Height Anchoring: Foliage vertex shaders automatically analyze local object space heights using packed negative vertex windows. Vertices sitting at the baseline pivot remain firmly stationary, while the upper canopies and blades scale smoothly into the swaying animation.
Adjusting Wind Behavior:
Select the target vegetation asset material in your Project window.
Ensure that the Enable Grass Waving checkbox toggle is active in the inspector.
Adjust the Wind Strength slider property to dynamically scale the physical bending distance and velocity of the asset.
Optimization Tip: When the Enable Grass Waving checkbox toggle is disabled on a material, Unity drops the compilation path in favor of a static shader variant. The GPU skips all wind nodes and vertex addition evaluations completely, ensuring zero performance penalty on non-vegetation structures.
The DPT_HarvestableProps System
Resource gathering nodes handle state updates cleanly via the modular DPT_HarvestableProps.cs script layer. This system features dynamic custom inspector interfaces handled via DPT_HarvestablePropsEditor.cs to streamline asset configuration.
System Core Architecture:
Multi-Object Progressive Harvesting: The system supports an array of harvestable child objects on a single prop. Each interaction randomly selects and removes one object from the remaining pool, allowing resources to deplete incrementally — for example, individual ore deposits on a rock face can be mined one at a time until the rock is fully exhausted.
Direct Variable Assignment: Mesh swapping operates explicitly via referenced GameObject fields inside the inspector slots, bypassing generic string searches or complex hierarchy scans.
Dynamic Inspector Formatting: The inspector interface alters itself contextually based on your configurations. Animation sub-parameters automatically display or hide themselves depending on the selected transition mode to keep workflows clean.
Single Material Compatibility: Audio variance parameters, structural animation mechanics, and particle instantiation routes have been authored to run entirely independent of material manipulation, protecting your SRP batching passes and maintaining maximum drawing performance.
Hierarchy-Aware Raycasting: Click detection uses GetComponentInParent to walk up the collision hierarchy, meaning clicks anywhere on a prop — trunk, canopy, ore nodes, or any child mesh — correctly resolve back to the root harvestable component without requiring a collider specifically on the root object.
Inspector Configuration Reference
Property Block
Field Name
Functional Impact
Core Settings
Objects To Disable
An array of harvestable mesh child objects. Each click randomly selects and removes one from the pool. The prop is fully harvested when all objects in the array have been removed. For single-state props, assign just one entry.
Object To Enable
The harvested stub, trunk, or empty bush variant to enable once the final object in the array has been removed (Optional).
Disable All At Once
When enabled, all objects assigned to Objects To Disable are removed simultaneously on the first harvest interaction. When disabled, objects are removed one at a time, allowing progressive depletion of resource nodes such as ore deposits (Optional).
Interaction Parameters
Harvest Range
Maximum threshold distance permitted between the target object and the player tracking system.
Player Transform
The target character/camera root reference checked against the range limits. Defaults to Main Camera if unassigned.
Audio Configuration
Harvest Sounds
An array pool of AudioClips from which the system randomly selects a resource impact audio track upon each individual harvest interaction.
Base Pitch
The standard playback pitch baseline anchor for the local AudioSource component.
Pitch Variance
A slider parameter bounding how much the pitch randomly deviates above or below the base pitch to avoid auditory repetition.
Visuals & Animation
Particle Prefab
Optional ParticleSystem asset spawned at the object location on each individual harvest interaction.
Particle Spawn Target
Optional game object to set as the spawn location for particle effects.
Particle Tint
Color data passed down cleanly into the instantiated particle vertex streams at runtime without duplicating materials.
Particle Scale
Multiplies both the physical size and the explosion velocity of particles to match varied environmental object volumes.
Particle Offset
Positional coordinate adjustments applied relative to the structural center of the object's physical collider space.
Stylized Animation
Animation Mode
Transition setting dropdown. Offers Instant state switching, Uniform Scale reduction, a flattening Squash and Sink profile, or the directional Tree Fall mode. See Tree Fall Settings below.
Transition Duration
The lifespan window of the visual movement loop measured in seconds. Hidden if Mode is set to Instant or Tree Fall.
Scale Curve
An editable AnimationCurve regulating the velocity timeline pacing. Supports elastic overshoots and bouncy pops. Hidden if Mode is Instant or Tree Fall.
Tree Fall Settings (visible when Animation Mode is set to Tree Fall)
Log Object
The log mesh GameObject to activate when the tree is felled. The system enables it at runtime and rotates it 90° away from the player to simulate a natural fall. The log should be set up upright in the prefab as an inactive child object — do not pre-position it in its resting state.
Use Physics Fall
Uses Rigidbody physics to topple the log naturally instead of using the built-in animated fall rotation. Requires a Rigidbody component on the assigned Log Object.
Fall Duration
How long the fall rotation takes in seconds. Recommended range: 0.5–1.5 seconds.
Fall Curve
An AnimationCurve controlling the easing of the fall rotation. An ease-in profile produces a natural slow-start, accelerating-fall feel.
Sink After Fall
If enabled, the log will sink below ground level and deactivate after landing, useful for scenes where log persistence is not required.
Sink Delay
How long the log rests on the ground before sinking begins. Only visible when Sink After Fall is enabled.
Sink Duration
How long the sink animation takes to complete. Only visible when Sink After Fall is enabled.
Callback Events
On Harvest
A customizable UnityEvent inspector container that fires when the final object in the array is removed, signalling the prop is fully exhausted. Use this to trigger inventory updates, score additions, or respawn timers.
Tree Fall Mode — Setup Guide
Set Animation Mode to Tree Fall on your tree prefab's DPT_HarvestableProps component.
Assign the standing tree mesh(es) into the Objects To Disable array as normal.
Assign your log mesh GameObject into the Log Object slot. It should exist as an inactive child object of the prefab, positioned upright near the base of the tree — the same orientation as the standing trunk.
Do not pre-position the log in its fallen resting state. At runtime, the system activates the log at its current transform and rotates it 90° away from the player to produce the fall — the fall direction is calculated automatically.
Choose whether to use the built-in animated fall system or enable Use Physics Fall for Rigidbody-driven falling behaviour.
Optionally enable Sink After Fall if you want the log to disappear after a delay rather than persist in the scene.
Log Pivot Point: Ensure the log mesh has its pivot positioned at the base/stump end of the mesh in your modelling application, not at the geometric centre. A centred pivot causes the rotation to originate from the middle of the log rather than the cut end, producing an unrealistic spin.
Log Collider / Physics Fall: If Use Physics Fall is enabled, the log must contain a Rigidbody component in order to respond to physics forces correctly. If no Rigidbody is present, the system will log a warning and skip physics-based motion.
Included Resource Presets
The asset package includes pre-configured resource profiles ready to map into your custom asset overrides:
Mining Profile: Uses the multi-object array system with individual ore node GameObjects assigned per rock. Each click removes one ore deposit.
Foliage Profiles: Optimized pop setups mapped out for berry picking or twig snapping activities using snappy, vibrant coloration pipelines.
Lumber Profile: Configured to use the Tree Fall animation mode. The standing tree mesh is assigned to Objects To Disable, with the corresponding log mesh assigned to Log Object. Paired with deep tree-falling impact audio.
Creating Custom Harvestable Prefabs:
Attach the DPT_HarvestableProps component to the root of your target entity prefab. This automatically adds required Collider and AudioSource requirements.
Assign your harvestable child mesh objects into the Objects To Disable array. For a single-state prop assign one entry; for multi-stage props (e.g. a rock with multiple ore deposits) assign each removable object as a separate array entry.
Optionally assign a post-harvest mesh into the Object To Enable slot — this activates when the final array entry is removed.
Select your preferred transition profile inside the Animation Mode dropdown menu.
Populate the Harvest Sounds array pool with appropriate impact sound clips, and use the Pitch Variance slider to configure audio variety.
Assign your shared particle effect asset into the Particle Prefab slot, adjusting the Particle Tint color, Particle Scale multiplier, and Particle Offset position to perfectly frame the prop's spatial boundaries.
Raycasting Requirement: The camera must possess an active Physics Raycaster component to translate cursor coordinates to interaction colliders accurately. Click detection resolves through the full GameObject hierarchy — clicking any child mesh, collider, or ore node on a prefab will correctly register against the root DPT_HarvestableProps component.
Technical Notes & Troubleshooting
"Foliage assets remain completely stationary"
Material Toggles: Open your asset material in the inspector and verify that Enable Grass Waving is checked.
Strength Value: Check the Wind Strength property slider on your material. If this slider is left at exactly 0.0, it multiplies the internal wave mathematical calculation by zero, completely neutralizing the movement.
"Nothing happens when I click resource nodes"
Physics Raycaster: Confirm your active Main Camera object carries a Physics Raycaster component. Without this, cursor operations cannot evaluate 3D world projections.
Collider Verification: Ensure your resource prefabs contain valid Collider bounds that encase the target interaction geometry. The collider can exist on the root or any child object — the system will resolve upward through the hierarchy automatically.
Distance Constraints: Move your tracking system closer to the target object; the event will fire only if your spatial distance falls below your configured Harvest Range.
Input System: Confirm the Input System package is installed via Window > Package Manager. If using the New Input System, ensure Active Input Handling in Project Settings > Player is set to either Input System Package (New) or Both.
"Only the first click does anything, subsequent clicks are ignored"
Objects To Disable Array: Verify that all intended harvestable child objects are assigned into the Objects To Disable array in the inspector. The system tracks remaining objects at runtime from this array — entries missing at setup time will not be registered.
Animation Blocking: Clicks are intentionally blocked while a transition animation is playing to prevent state conflicts. If your Transition Duration or Fall Duration is set very high, wait for the animation to complete before clicking again.
"Tree Fall mode — the log spins in place rather than falling over"
Log Pivot Point: Ensure the log mesh has its pivot positioned at the base/stump end of the mesh in your modelling application, not at the geometric centre. A centred pivot causes the rotation to originate from the middle of the log rather than the cut end.
Player Transform: The fall direction is calculated away from the player. If Player Transform is unassigned and no Main Camera is found, the tree will fall along the prefab's forward axis as a fallback.
"Particles are hidden inside the mesh or underground upon harvest"
Bounds Centering: The system automatically shifts spawn roots up to Collider.bounds.center to clear standard ground pivots. Ensure your asset has an accurate collider component setup attached.
Offset Constraints: For tall meshes or wide structures, use the Particle Offset property vector inside the inspector to translate the emission node coordinates until they sit outside the asset's structural volume.
"Particles spawn but do not burst outward or appear too tiny"
Prefab Scaling Mode: Open your particle system prefab and ensure the Scaling Mode dropdown option in the Main module is explicitly configured to Hierarchy.
Scale Adjustment: Increase the Particle Scale value on the prop's script layer. This dynamically scales up particle sizing parameters and internal structural speed vectors to clear heavy prop boundaries easily.
Compiler Errors regarding Input Layouts
Open the Package Manager, select the Unity Registry view, and confirm that the modern Input System package is successfully downloaded and initialized.
Character Controller Integration: To port this infrastructure to a standard first-person or third-person character rig, transfer the Physics Raycaster to your character's primary camera object. The DPT_HarvestableProps scripts require no modifications; they automatically target the designated MainCamera transform reference for all target distance checks.
Support & Custom Pipeline Integration
If your project requires external or custom 3D models to be fully integrated into the DPT ecosystem—including custom vertex-data packing, procedural wood grain mapping, normal array configuration, advanced GPU wind system implementation, or any other bespoke features—freelance technical art services are available. Additionally, availability extends to general 3D asset production, high-to-low poly hard surface modeling, stylized prop creation, and game-ready LOD budgeting built to align cleanly with your specific project constraints.
Contact & Inquiries:
For freelance modeling contracts, custom asset optimization passes, standard package bug reports, and publisher licensing enquiries, please use the Contact Form on the DPT Games Hub.
DPT Support Discord:
For dedicated technical assistance, asset configuration help, and direct feedback on our Unity packages, join the Support Server.