playMaker

Author Topic: Beginner problem with collisions [SOLVED]  (Read 343 times)

ChrysalisLiam

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Beginner problem with collisions [SOLVED]
« on: March 03, 2019, 03:41:00 PM »
Hey there, I'm a total beginner with PlayMaker, and I'm running into a problem with collisions. Here are some pictures I've taken of the objects I'm dealing with: https://imgur.com/a/qQwMoXe.

I've made an FSM on a cube named InteractObject (a stationary cube), and the first step is to detect a collision with an Object called ExamineRange (a cube that floats right in front of the player to help detect what type of object you're facing). When I attach ExamineRange to the default ThirdPersonController Unity offers and walk over to the InteractObject, the collision occurs and the Event plays through successfully. However when I take the ExamineRange object off of the ThirdPersonController and attach it to Unity's default FPSController, it does not trigger the collision. Additionally, it does not trigger the collision when I remove the ExamineRange object from any parents and manually overlap it with InteractObject during Play mode. As far as I can see, it's only working when attached to ThirdPersonController and it's really confusing me. I've tried replicating every aspect of the ThirdPersonController I could see within the FPSController (the pictures I posted are not reflective of this as I've undone the changes), but I really can't find a fix. Any help would be much appreciated.

I'm using Unity 2017.4.18f1.
« Last Edit: March 16, 2019, 03:57:40 PM by ChrysalisLiam »

fromfame

  • Junior Playmaker
  • **
  • Posts: 65
  • Sloppy PM Veteran
    • View Profile
Re: Beginner problem with collisions
« Reply #1 on: March 04, 2019, 12:17:37 AM »
Hi, welcome! I'd like to help but I'm having a hard time understanding where you are with the problem.

Could you describe in short what're you trying to achieve?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4373
    • View Profile
    • jinxtergames
Re: Beginner problem with collisions
« Reply #2 on: March 04, 2019, 03:47:15 PM »
Hi.
Its possible the interact object needs a rigidbody.
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

ChrysalisLiam

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Beginner problem with collisions
« Reply #3 on: March 06, 2019, 07:07:52 PM »
Hi, welcome! I'd like to help but I'm having a hard time understanding where you are with the problem.

Could you describe in short what're you trying to achieve?

Basically the ExamineRange object hovers in front of the player and is intended to collide with the InteractObject object. The attached picture of the FSM shows how it's set up. The issue is that it presently functions when parented to Unity's provided Third person character controller, but will not seem to function without being attached to that (eg.: Being dragged around the scene in play mode or attached to Unity's provided First person character controller). The objects simply will not register a collision, and I can't for the live of me figure out what is causing this inconsistency.

Hi.
Its possible the interact object needs a rigidbody.
Unfortunately I've tried adding a rigidbody to every combination of objects and it still will not register a collision. :(
« Last Edit: March 06, 2019, 07:09:27 PM by ChrysalisLiam »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4373
    • View Profile
    • jinxtergames
Re: Beginner problem with collisions
« Reply #4 on: March 07, 2019, 08:48:32 AM »
Hi.
Ah! i just looked again to the image and saw that 'is trigger' is checked.

This will change your collider to a Trigger.

You will need to use the Trigger actions instead of Collision actions :)
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

ChrysalisLiam

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Beginner problem with collisions
« Reply #5 on: March 16, 2019, 03:56:52 PM »
Sure enough, that was it! Thank you for your help!