Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: treborjones on August 18, 2015, 01:07:03 PM

Title: Set sun shafts transform from instansiated object
Post by: treborjones on August 18, 2015, 01:07:03 PM
Howdy everyone,

I'm using the sunshafts script but want to set the 'shafts caster' transform to be of an object that's instantiated. How would I go about that? When I look at options from set property it's the only variable thats not available to specify.

My sunshafts script is on my camera which is present in the inital scene.

My sun object is spawned in as part of the level object. It's the position of this sun that I want to define the transform of the sun shafts caster.

Cheers for any help.

Bob.
Title: Re: Set sun shafts transform from instansiated object
Post by: treborjones on August 18, 2015, 01:10:54 PM
Just a bit more info on what I've been trying.

I looked at trying to use the 'Get Transform' action but that didnt allow me to specify 'Use owner', so was taking the transform from the prefab (not desired).
Title: Re: Set sun shafts transform from instansiated object
Post by: treborjones on August 18, 2015, 03:06:05 PM
I got it in the end. Typing out loud helps sometimes! :-)

Realised that I could use 'Get Owner' to save out the GameObject, then Get Transform on that stored Game object.