With the help of Jun, I have worked out how to make an entity's glow parameter increase according to the amount of time the player spends within a proximity trigger. As the glow increases in proportion to time, the float becomes very high so it is necessary to divide the counter using a math div node to reduce the input to the material parameter float. The counter is set to a maximum of 10 so the glow amount increases by the increment 10 times and then resets.
With further refinement and Andrew's idea with the logic gate, I have come up with this flowgraph. This flowgraph allows the player to leave the area, saving the current glow degree and then restarts the increasing glow upon re-entering the proximity trigger. This is potentially really powerful in recording time as it can accumulate time spent within a given area. This is the result:
No comments:
Post a Comment