FAQ & Troubleshooting
Nothing happens when I hit the foliage
Check these in order:
- Damage is applied on the server. Damage on a client is ignored. See Multiplayer.
- The foliage type uses FoliagePluginComponent as its Component Class. See Setting up Foliage.
- The trace or projectile hits the foliage. The foliage needs collision that blocks your trace channel. See Collision Setup.
- The mesh is in the Data Table. The painted mesh must be in Foliage Meshes in a row, and Foliage Data Table must be set in the Project Settings.
- The row has a Foliage Actor Class.
- The damage type is valid if Require Damage Type is on. See Damage Types.
Turn on Enable Debugging and verbose logging. The messages tell you which step fails.
The foliage turns into an Actor, but I get no reward
Neither the Instigator nor the Damage Causer implements the Foliage Plugin Interface. Note that the Instigator is a Controller: if you implement the interface on your Character, pass the Character as Damage Causer. See Foliage Plugin Interface.
The reward amount is always the same
Min and Max in Number of Rewards are only data. Pick the amount yourself, for example with Random Integer in Range. See Harvesting Foliage.
The player gets a reward on the first hit
That is the default: every hit is a harvest, including the first one. Use a Health value to require several hits per harvest.
Foliage does not respawn
- Enable Respawning is off for the row, so the instance was removed.
- A player or another blocking object is within Block Foliage Respawn Radius.
- The Foliage Actor still exists. It may be kept alive by a player within Block Foliage Despawn Radius.
- Respawns are only attempted every Foliage Respawn Rate seconds, 60 by default.
See Lifecycle of a Foliage Instance.
Foliage Actors never despawn
A player or another object of the Blocked Respawn Object Types is within Block Foliage Despawn Radius, so the lifetime keeps being extended. Lower the radius or change the object types in the Plugin Settings.
Trees do not fall over
See Simulating Physics → Troubleshooting.
Harvested foliage comes back after restarting the game
Turn on Enable Persistent Data and save before quitting. See Saving and Loading.
After an update, the wrong trees are hidden
The save identifies instances by their index, and painting or erasing foliage changes the indices. Increase Save Game Version when you ship a level with changed foliage. See Saving and Loading.
Can I use it with World Partition or level streaming?
Yes. Foliage in streamed levels picks up its hidden and removed instances when it is loaded.
I see "Failed initializing foliage component" in the log
A foliage component uses a mesh that is not in your Data Table. This is expected for foliage you do not want to harvest. Switch those foliage types back to the default component class to remove the message.