playMaker

Author Topic: Playmaker action for "Volumetric Light Beam" ?  (Read 2382 times)

Bluebook

  • Playmaker Newbie
  • *
  • Posts: 6
Playmaker action for "Volumetric Light Beam" ?
« on: May 29, 2020, 03:43:53 AM »
Hello!
Is there Playmaker action for "Volumetric Light Beam" from the Unity Asset Store?
https://assetstore.unity.com/packages/vfx/shaders/volumetric-light-beam-99888

Thank you very much.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Playmaker action for "Volumetric Light Beam" ?
« Reply #1 on: May 29, 2020, 07:37:37 AM »
Hi,
Some of it can be connected to the light component, so you could manipulate those.

what values do you need to change @runtime?

Bluebook

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Playmaker action for "Volumetric Light Beam" ?
« Reply #2 on: May 29, 2020, 02:06:52 PM »
Many thanks for the quick response.

 I would like to adjust the values 'Range Limit' in the section "Fall-Off Attenuation" of the "Volumetirc light Beam (Script)".
I already got some success using the 'Set Property' option in Playmaker.
Also the Playmaker action for 'Light' switch it on and off. So I gues that the 'Set Property' can change every Variable?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Playmaker action for "Volumetric Light Beam" ?
« Reply #3 on: May 30, 2020, 03:13:14 AM »
Hi.
Yes 'Set Property' can be used for that, but always try to minimize using that action as it uses 'mirroring' and is slower that dedicated actions.

Also you might need to use Linker wizard to make it work in a build.


Bluebook

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Playmaker action for "Volumetric Light Beam" ?
« Reply #4 on: May 30, 2020, 04:09:02 AM »
I see ...

So I will try to make a custom action for it. Got your Action from the Asset Store for 'Lean Pool' maybe I can change it for 'Light Beam'.

Thanks for your time.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Playmaker action for "Volumetric Light Beam" ?
« Reply #5 on: May 30, 2020, 11:29:31 AM »
Hi.
Thanks for purchasing the asset..

I actually have the asset and already looking to make some actions for it.
I will try to make a set by the end of the week.

But its good to try to make your own :)
That's how i learned C#
By looking to other actions.

Here is a good video about creating custom actions :


Also here is a good page to have a look at :
https://hutonggames.fogbugz.com/default.asp?W166

Bluebook

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Playmaker action for "Volumetric Light Beam" ?
« Reply #6 on: May 30, 2020, 01:56:30 PM »
Oh that would be great! Thanks a lot!

I just started to learn c# but with Playmaker I am a lot faster to get things done. I will look to the Tutorial as well.

Bluebook

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Playmaker action for "Volumetric Light Beam" ?
« Reply #7 on: June 22, 2020, 09:43:25 AM »
Hello!
Tried to make a 'Custom Action' for the "Volumetric Light Beam"-PlugIn last week. The attached script changes the angle of the beam in the Inspector window, but does not change the beam itself. I do not now why.
I've been trying around for a while and don't understand how exactly the change in the script 'VolumetricLightBeam.sc' works.

I have no clue at the moment.

A small example related to the PlugIn "Volumetric Light Beam" would help me a lot. Maybe I could use it to make the rest myself.
Thanks a lot


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Playmaker action for "Volumetric Light Beam" ?
« Reply #8 on: June 22, 2020, 01:17:58 PM »
Hi.
Sorry i totally forgot about this.

You can always bump a post :)

I made 2 actions to get and set the basic properties

You can see some difference like on the "public class" line

I use "ComponentAction<VolumetricLightBeam>" instead of FsmStateAction

It works a little faster this way when you need to target a component (not noticeable when a few of these action are used @ the same time)

also instead of "theScript = go.GetComponent<VolumetricLightBeam>();"
i use "cachedComponent" which holds the same as 'theScript'

in the VLB_SetBasicProperties in the OnEnter you can see i use this :
cachedComponent.UpdateAfterManualPropertyChange();

this needs to be done to update if 'Track changes during Playtime' is disable' and this should only be done this way if you don't change every frame.

if you need to change every frame you need to turn on 'Track changes during Playtime' on the component.

Also if you have a light component, make sure that on the spot angle the 'From Spot' is disabled
Else it will use the angle from the light component.
(This might be the reason your action did not work)



Bluebook

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Playmaker action for "Volumetric Light Beam" ?
« Reply #9 on: June 22, 2020, 02:05:00 PM »
Many thanks for the quick answer!

Great that you made me the actions for Light Beam.  :) :) :) :)
I will take a look at it right now and try to follow it up.

Really good support!

Thank you very much!