PlayMaker Help & Tips > PlayMaker Help
Detect when GameObject out of view [Solved]
izzycoding:
Hi,
I have a scene where I need to be able to detect when an object is out of view.
For example, my character throws a bouncy ball, when the ball goes out of view I want the FSM to detect this and destroy its self.
Is there anything that can do this for me?
I was previously using a script in the OnBecameInvisible function to detect this.
Any ideas would be great.
Regards,
Alex Chouls:
Playmaker has a built in system event: BECAME INVISIBLE.
This is fired by the OnBecameInvisible event. So it's equivalent to what you were doing before.
Use this event in a global transition to activate a state and run actions when the GameObject becomes invisible.
Note: Unity uses ALL cameras to determine visibility, including the Scene View camera! Take this into account when testing!
izzycoding:
Hi,
That is great, where do i find that? As I cant see it anywhere.
Currently I only have a single camera in my scene so that should be fine.
Regards,
Alex Chouls:
When you right click on a state to add a transition you can drill down to System Events.
See attached image.
izzycoding:
Hi,
Great thanks, I knew it would be something simple.
:-) I was looking for an Action for this....lol
Regards,
Navigation
[0] Message Index
[#] Next page
Go to full version