playMaker

Author Topic: Detect two objects overlaping  (Read 1849 times)

ingumak

  • Playmaker Newbie
  • *
  • Posts: 20
Detect two objects overlaping
« on: August 14, 2017, 12:52:17 AM »
Hello! I'm new here and it's probably a stupid question. But I'm not able to find the answer. It is probably because of my limited English that I can not find a way to look for it.

My problem is that I can not find the method to throw an event when one object (No the player) enter into a trigger object to activate something.

In the tutorials I have seen, we always trigger with the character. But when I want an event to be thrown when another object comes into contact with the trigger. How do I do it? With what actions?

Or at least something that gives me the option to detect that both objects are overlapping or in contact.

I'm sorry if the question is too obvious. But I do not find any action to do that or video tutorial showing this.

Thank you very much!!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Detect two objects overlaping
« Reply #1 on: August 14, 2017, 01:28:20 AM »
Hi, i think you need "trigger event" (when 'is trigger' is selected on the collider)
or "Collision Event"

on the tutorial page  you can find a link to the PlayMaker YouTube Channel
and to the user tutorial wiki page there are a lot of basic and advanced tutorials that might be useful :)

ingumak

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Detect two objects overlaping
« Reply #2 on: August 14, 2017, 01:54:23 AM »
Hello! Thanks for the reply.

I've done several of the tutorials (All basics I think). The problem is that in these tutorials the trigger is always executed with the player. It is the character that enters the trigger. I need to detect it when any object goes into the trigger. Is the same?

Should I understand that any object that comes into contact with that trigger will cause the event to be sent? Does it work like this? And delimit what objects can do this by choosing the "tag"?

Should it work that way?

Thank you!!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Detect two objects overlaping
« Reply #3 on: August 14, 2017, 02:05:33 AM »
Hi,
for any object, click on the = next to the 'Collider Tag' variable

Not sure if you need to press it 2x (the variable will show empty 1x will show 'none') or 1x

i can't test right now.

ingumak

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Detect two objects overlaping
« Reply #4 on: August 14, 2017, 04:53:26 AM »
Hi! Thanks again.
I had done this, yes. But it does not work.
The thing I want to do seems very simple:
When one object that is moving (with itween) enter into the trigger object. A event is send.

For this I have created a box that is a trigger. And other box that enter into the trigger.

All works well. But when The box os into the trigger, does not send the event. I think that it is because the trigger is not detected.

 I can't now, but then I will put here a screenshoot.

I'm sure that is very simple and I am very stupid jajajaja. But I can't see where is The problem.

Sorry for my unknowledge. Thanks!! And sorry for my poor english!!

ingumak

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Detect two objects overlaping. SOLVED
« Reply #5 on: August 14, 2017, 08:11:35 AM »
As I had suposed. I have been an idiot :D. Sorry. I didnĀ“t know that the objects have to have a rigibody component. Thanks for your help! I have to learn a lot more :D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Detect two objects overlaping
« Reply #6 on: August 14, 2017, 10:36:55 AM »
Hehe, nah your not an idiot. believe me I've been there
It's normal to bump in these kind of things while learning :)

anyway,
Even if you think it is a stupid or a simple question, don't be afraid to ask  :D