DPT Games Harvestable Scenery Pack

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.

Quick Navigation Reference: Setup & Dependencies Sandbox Navigation Vegetation Wind System HarvestableProps System Inspector Reference Tree Fall Setup Guide Resource Presets Creating Custom Prefabs Troubleshooting Notes Support & Contracts

Setup & Dependencies

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.

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:

Adjusting Wind Behavior:

  1. Select the target vegetation asset material in your Project window.
  2. Ensure that the Enable Grass Waving checkbox toggle is active in the inspector.
  3. 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:

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

  1. Set Animation Mode to Tree Fall on your tree prefab's DPT_HarvestableProps component.
  2. Assign the standing tree mesh(es) into the Objects To Disable array as normal.
  3. 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.
  4. 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.
  5. Choose whether to use the built-in animated fall system or enable Use Physics Fall for Rigidbody-driven falling behaviour.
  6. 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:

Creating Custom Harvestable Prefabs:

  1. Attach the DPT_HarvestableProps component to the root of your target entity prefab. This automatically adds required Collider and AudioSource requirements.
  2. 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.
  3. Optionally assign a post-harvest mesh into the Object To Enable slot — this activates when the final array entry is removed.
  4. Select your preferred transition profile inside the Animation Mode dropdown menu.
  5. Populate the Harvest Sounds array pool with appropriate impact sound clips, and use the Pitch Variance slider to configure audio variety.
  6. 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"
"Nothing happens when I click resource nodes"
"Only the first click does anything, subsequent clicks are ignored"
"Tree Fall mode — the log spins in place rather than falling over"
"Particles are hidden inside the mesh or underground upon harvest"
"Particles spawn but do not burst outward or appear too tiny"
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.