FORGE3D
  • Welcome
  • FAQ
  • Sci-Fi Effects
    • Getting started
    • Turrets
    • Turret Controller
    • Pool Manager
    • Examples
    • Scripts
    • Changelog
  • Force Field
    • Getting started
    • Force Field Video Tutorial
    • Force Field Controller
    • Rigidbodies
    • Shaders
    • Impact Points
    • Upgrading
    • Platform Differences
    • Changelog
  • Wasp Interdictor
    • VR Setup
    • Controller Components
    • PSD Template
    • Substance Painter Sources
  • Damage FX
    • Shader
    • Controller
    • Colliders
    • Material
    • Debugging damage
    • Impact points
    • Damage FX Shader Node
  • Planets
    • Changelog
Powered by GitBook
On this page
  1. Force Field

Force Field Controller

PreviousForce Field Video TutorialNextRigidbodies

Last updated 4 years ago

Force Field Controller

The Controller component handles the Shield shader behavior by acquiring impacts sent through the OnHit() method.

“Fix Rigidbody” – Enables a workaround to the Unity limitation introduced starting with version 5.0 and higher, where a MeshCollider and a Rigidbody no longer work together attached to the same object leading to an error spam in the console.

“Field” – A reference to a Shield object(s) to control.

“Collision Enter” – The shield will respond to a collision when its collider/rigid body has begun touching another rigid body/collider.

“Collision Stay” – The shield will respond to a collision once per frame for every collider/rigid body that is touching its rigid body/collider.

“Collision Exit” – The shield will respond to a collision when its collider/rigid body has stopped touching another rigid body/collider.

“Decay Speed” – The speed at which the current hit points are faded away. Higher decay value leads to a faster decay. Setting the value to zero will freeze the effect. You may use this feature to fine-tune the shield.

“React Speed” – A time gap in milliseconds at which the controller registers new hits. A zero value will remove a limitation, and a value of one will limit to one hit per second.

“Fix Non Uniform Scale” – This option is designed to help with setting a shield affected by a scaled transform.