playMaker

Author Topic: Collision problem (shooting)  (Read 3251 times)

VictorRayDev

  • Playmaker Newbie
  • *
  • Posts: 35
Collision problem (shooting)
« on: January 16, 2013, 01:56:40 PM »
Hi y'all! Hope you doing fine on this new year!
I'm still working on my game its going well!

I have a little question.

Is it possible to actually disable the physic between to object for a certain amount of time.

In my game I have ennemys who shoot missile. But the ennemys and the missile is a physic object.
So when I apply a force to the missile and I spawn it near the ennemy. The missile actually drag the ennemy with him :O.

I hope I'm clear it's a little hard to explain for me haha.



jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Collision problem (shooting)
« Reply #1 on: January 17, 2013, 01:08:41 AM »
Hi,

 Uhm, yes, doesn't make sense to me as is. somehow, either the two physics object are still attached via a joint it seems. How to you create the missile?

bye,

 Jean

VictorRayDev

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Collision problem (shooting)
« Reply #2 on: January 17, 2013, 10:27:57 AM »
The missile is spawned via poolmanager2 and I use your custom action to shoot it.

What I think happen is when the missile spawn over the ennemy the two physic object collide so the missile drag the ennemy in the air.

Thank you Jean you are so helpful! You already have a place in the credit of this game!  8)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Collision problem (shooting)
« Reply #3 on: January 18, 2013, 01:08:20 AM »
Hi,

 ok, then one solution is to spawn the missile further away from the user.

 the other solution is to use the physics collision matrix and have your player on a different layer then the missile and have both layers not applying physics between them, they will simply ignore each other.

http://docs.unity3d.com/Documentation/Components/class-PhysicsManager.html

bye,

 Jean

VictorRayDev

  • Playmaker Newbie
  • *
  • Posts: 35
Re: Collision problem (shooting)
« Reply #4 on: January 21, 2013, 04:10:15 PM »
Thanks i'll try that!