playMaker

Author Topic: Setting IsTrigger[SOLVED]  (Read 1438 times)

abend

  • Playmaker Newbie
  • *
  • Posts: 36
Setting IsTrigger[SOLVED]
« on: October 17, 2018, 10:14:18 PM »
so I have a bow and arrow. If the arrow is not set to istrigger = true, it hits the bow on the way out and flops around. So I have to have istrigger = false when I first shoot it. but I need to have istrigger = true before it lands, so it can stick into whatever it hits. So I made a simple solution. I put the bow inside a standard sphere. and have a FSM for on trigger exit. at that time, the arrow is free of the bow. So then I "Set Property" on the arrow (box collider)'s IsTrigger = false. I can see that the FSM runs and returns to the listening state. all in all it seems pretty straight forward. However I can see in the inspector that the arrow is not set to false, and it disappears through the ground, instead of stopping on contact.

If I manually change the istrigger, it does hit the ground, but it also won't come off the bow properly (because of the arrow flights (feathers)).

Any ideas out there? This seems like it should just work.
« Last Edit: October 29, 2018, 06:10:55 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Setting IsTrigger
« Reply #1 on: October 18, 2018, 03:11:20 AM »
Hi,

 simply use the layer matrix and assign the bow and arc to different layers and make them ignore each other. that will work.

 Bye,

 Jean

abend

  • Playmaker Newbie
  • *
  • Posts: 36
Re: Setting IsTrigger
« Reply #2 on: October 18, 2018, 03:16:54 PM »
Hey Jean,

Thanks! I figured it out, the sphere was falling forever, and no longer around the bow. I set it as IsKinematic, and I believe it's working now. I'm a newb, so it's going to be like this for a while. Thanks for the response!