Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: ChrysalisLiam on March 03, 2019, 05: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.
-
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?
-
Hi.
Its possible the interact object needs a rigidbody.
-
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. :(
-
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 :)
-
Sure enough, that was it! Thank you for your help!