Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Karin on August 06, 2020, 05:54:16 PM

Title: Is it possible to get distance from a created prefab? [SOLVED]
Post by: Karin on August 06, 2020, 05:54:16 PM
Hello everyone

I would like to know if it's possible to create an object from the player and get the distance of the created object on every frame.

I experimented with "Get Distance" after creating the object, but every time I start the game the distance picks up on the something that's not there at 0,0,0 coordinates which is the default value.
Title: Re: Is it possible to get distance from a created prefab?
Post by: heavygunner on August 06, 2020, 06:54:21 PM
While you create that object from player, store that created object in a variable. Then, Once created that object, move to next state and get distance between Owner (player) and created object.
Title: Re: Is it possible to get distance from a created prefab?
Post by: Karin on August 06, 2020, 08:17:47 PM
While you create that object from player, store that created object in a variable. Then, Once created that object, move to next state and get distance between Owner (player) and created object.

Wow! I was under the impression it was strictly string based for stored results. Most of the stored results mostly work with bool or String most of the time.

Much appreciated, thanks this was the method I was looking for.  :D