Fade color can be changed or disabled to produce a pure wall push back effect on impact. VRHeadBlocking.cs: // VR Head Blocking Script (Synaptic Response) // For use with SteamVR Unity Plugin v2 // Attach to Player -> FollowHead -> HeadCollider and set Tag to "Player" // Initial Implementation: Scott Lupton (04.18.2020) using System.Collections; using System.Collections.Generic; using UnityEngine; using Valve.VR; public class VRHeadBlocking : MonoBehaviour { public GameObject player; [SerializeField] bool fadeEnabled = true ; [SerializeField] Color fadeColor = Color.black; private int layerMask; private Collider[] objs = new Collider[ 10 ]; private Vector3 prevHeadPos; private int fadeState = 0 ; private float fadeDuration = . 5f ; private float internalFadeTimer = 0f ; private float backupCap = . 2f ; private void Start () { ...
1) Create a copy of the original texture and highlight only the parts that should shine in either red, blue, or green 2) Multiply that texture sample with a vector parameter representing the light color (using the appropriate red, blue, or green channel from the texture to isolate the area to light up) 3) Multiply this by a scalar parameter called emissive strength so that you can pump up this value to make the shine brighter 4) Wire this into the emissive color channel
Comments
Post a Comment