
L
Publisher
luisboch
Field of View
2D
FOV AI Detection Visibility Customizable Groups Precision Area
Node that allow use of "view area", can be used with IA to identify enemy, used with security camera etc, check the Demo (Demo.tscn and Camera.tscn under demo folder).
This plugin has been mirrored from the Godot Asset Library.
The plugin author is in no way affiliated with Gadget.
If you are the author of this plugin and would like this mirror removed, please contact support@gadgetgodot.com.
Godot Field Of View
Godot script that allow use of Field of View in (currently) 2d game.
Features
- Hight customizable
- Multiple targets
- Target defined by groups
- Precision can be defined
- Update delay (faster will use more cpu)
How to install
Can be installed from asset lib
How to use
- Enable plugin under project settings
- Add Field of View node
- Configure it (And add target groups to track, without it, plugin will not work as expected!)
- From Character node read "in_danger_area" and "in_warn_area" properties to get the visible nodes, or,
- Use events "target_enter" or "target_exit" to work;
Configurations
- View Detail: Int, Indicates the number of rays created to check the Fov area, greater value will be more precise with cpu cost.
- Field of View: In degrees, configure the view angle
- Warn distance: Float, view distance
- Danger distance: Float, view distance to consider danger, must be lower than Warn distance
- Show Fov: Bool, use to view the rays created
- Show Target line: Bool, draw line to target?
- Fov Color: Color, when Show Fov is true, this define the color used to draw rays
- Fov Warn Color: Color, when Show Fov is true, this define the color used to draw rays when is "warn" state
- Fov Danger Color: Color, when Show Fov is true, this define the color used to draw rays when is "danger" state
- Frequency: Float, frequency to update view area, lower will update fast with cpu cost, default value is 0.5
- Target Groups Array groups to track, required at least one.
- Collision Mask
Current state








Previews:




How-To from zero
A complete how to use this plugin.
