Hey everyone,
New Interactive Grass Plugin!
I’m super excited to introduce my new interactive grass plugin! This makes grass and flowers in your game move when something touches them. Inspired by ADRENALXNE/Dev1n’s Interactive Grass tutorial/showcase, but I’ve added a bunch of new features for optimization, aesthetic, and configuration.
How to setup?
Simply click the “Install” button in the menu to install everything, then select your grass parts and select “Tag Grass”, and thats all!
How to update?
Simply click the “Update” button in the menu and it’ll update your code to the latest version!
Key Features
- Realistic Movement: Makes the grass move like it would in real life.
- Easy to Use: Simple to add to any game or virtual project.
- Adjustable: You can tweak the settings to get the perfect look and feel.
Options
Install Interactive Grass
- Installs the scripts and sets everything up instantly.
Uninstall Interactable Grass
- Uninstalls all the scripts and removes all tags.
Tag Grass
- Tags the selected objects with “Grass” to make them be interactable.
Untag Grass
- Untags the selected objects to make them not interactable.
Tag Hitbox
- Tags the selected objects to make them a hitbox/interactable with grass.
Untag Hitbox
- Untags the selected objects to make them not a hitbox/not interactable with grass.
Update Grass Physics
- Updates your scripts with the latest available code.
Create Hitbox
- Creates a hitbox for the selected object, helpful if you want to make the hitbox size of a object smaller
Config:
GrassPhysics.Config = {
WindShake = {
Enabled = true, -- Enable/disable wind shake effect, ENABLING THIS DOES NOT ADD IT INTO YOUR CODE! You must set it up yourself, but turn this on if you have it shake the grass using wind.
ScriptPath = {
Path = Players.LocalPlayer.PlayerScripts.WindControllerClient -- Path to the wind shake script, not the module, the script that requires it, example: Players.LocalPlayer.PlayerScripts.WindControllerClient
} :: ScriptPathConfig
} :: WindShakeConfig,
OcclusionCulling = {
HideGrass = {
Enabled = false -- Enable/disable hiding grass when its not visible on the screen, can improve performance but may cause bugs.
}, -- ONLY KEEP ONE OF THESE ENABLED, THE OTHER ONE FALSE
DisablePhysics = {
Enabled = false -- Enable/disable disabling grass physics when the grass isn't visible on the screen, can improve performance.
},
},
Sound = {
Enabled = true, -- Enable/disable sound effects
Volume = 0.1, -- Volume of the plant sound effects (0.0 - 1.0)
PitchRange = { -- Range for randomizing pitch of plant sounds
Min = 0.8,
Max = 1.0
},
Reverb = { -- Reverb settings for the sound
Enable = false,
DecayTime = 2.0,
ReflectLevel = 0.5
},
Spatial = { -- Spatial audio settings
Enable = true,
RolloffMode = Enum.RollOffMode.Linear,
MinDistance = 10,
MaxDistance = 100
}
},
Tween = {
Duration = 1.6, -- Duration of animation tweens in seconds
EasingStyle = Enum.EasingStyle.Elastic, -- Easing style for animation tweens
EasingDirection = Enum.EasingDirection.Out, -- Easing direction for animation tweens
TweenName = "pivotTween" -- Name for the tween instance
},
Physics = {
HitboxRadius = 200, -- Radius around the hitbox within which effects will be activated
Intervals = {
UpdateInterval = 0.1, -- Update interval for checking activations and camera positions
CameraUpdateFactor = 2, -- Factor to control how often camera updates are checked
ActivationUpdateFactor = 2 -- Factor to control how often activation updates are checked
}
},
Grass = {
Tag = "Grass", -- Tag used to identify grass objects, changing this can break the plugin
HitboxTag = "Hitbox", -- Tag used to identify hitbox objects, changing this can break the plugin
Transparency = 1, -- Transparency level of the hitbox
CollisionResponse = { -- Collision response settings for the grass
Enable = true,
Friction = 0.5,
Bounce = 0.1
}
},
Camera = {
FieldOfViewThreshold = 2, -- Additional degrees to the camera's field of view for angle checks
MovementThreshold = 1 -- Minimum movement in position or rotation to consider camera as moved
},
SoundAsset = {
SoundEnabled = true,
SoundLimit = 50, -- Keep this low, but not too low or your sounds will sound ugly.
SoundMappings = {
Grass = {
SoundId = "rbxassetid://8008438167",
VolumeRange = { Min = 0, Max = 0.25 }
},
GrassHitbox = {
SoundId = "rbxassetid://8008438167",
VolumeRange = { Min = 0, Max = 0.25 }
},
Hitbox = {
SoundId = "rbxassetid://8008438167",
VolumeRange = { Min = 0, Max = 0.25 }
},
--[[Add more sounds as needed, example
Flower = {
SoundId = "rbxassetid://0",
VolumeRange = { Min = 0, Max = 0.1 }
},]]
}
},
Debug = {
EnableLogging = false, -- Enable or disable debug logging
ExtraLogging = false, -- Extra debug logging, may flood your output; must have Enable Logging set to true for this to work
LogFrequency = 5 -- Number of updates between log entries
}
}
Planned Features:
- More debugging options, such as toggling different sections (Toggling WindShake debugging, toggling sound debugging, toggling hitbox debugging, etc) since right now turning on logging/debugging can lag your game due to the number of prints in the output.
- Option to make a model into grass, which will create a hitbox and well everything inside the model to that part and tag the hitbox
- Entire modernistic UI Overhaul
Testing Place:
Interactive Grass Testing Place
If the grass and buttons don’t work in the testing place, this is most likely due to something loading too late/quickly, please rejoin to test it again, I’m working on fixing this.
Download Link
Please feel free to inform me about bugs or suggestions to improve this aswell as ideas for future features!
Would you use this in your games? (Test it here before voting😉)
- Yes
- No
- Maybe
- If it was free
0 voters