playMaker

Author Topic: collider not working after overlap or selected as trigger  (Read 2571 times)

ryf9059

  • Full Member
  • ***
  • Posts: 100
collider not working after overlap or selected as trigger
« on: March 17, 2014, 05:33:42 AM »
I have two object that will trigger some event at contact, but as I know if I select the object collider as trigger then it will no longer have physical simulation, the other object will just fall through it. Is there a way for me to use them as trigger to trigger event and at the same time apply physical simulations on it like blocking the object from falling through?

Another similar problem. I have two objects with colliders, but I use mouse to drag move one of them. When I drag one into the other, the colliders didn't block each other but instead allow the object to go into that collider, hence losing the effect and letting the object falling throught after I stop dragging. Is there a way for me to keep the physical simulation so when I drag one object into the other they will just be pushed away instead?

P.S. for the dragging I use set position and use camera screen to world point, maybe not eh best way in case of avoiding collision, any better ideas?

Please advise.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: collider not working after overlap or selected as trigger
« Reply #1 on: March 17, 2014, 09:30:55 AM »
I have two object that will trigger some event at contact, but as I know if I select the object collider as trigger then it will no longer have physical simulation, the other object will just fall through it. Is there a way for me to use them as trigger to trigger event and at the same time apply physical simulations on it like blocking the object from falling through?

Hmm.. I haven't tried this, but have you looked into have a Trigger and a Collider, with the Trigger being larger than the Collider?


Quote
Another similar problem. I have two objects with colliders, but I use mouse to drag move one of them. When I drag one into the other, the colliders didn't block each other but instead allow the object to go into that collider, hence losing the effect and letting the object falling throught after I stop dragging. Is there a way for me to keep the physical simulation so when I drag one object into the other they will just be pushed away instead?

P.S. for the dragging I use set position and use camera screen to world point, maybe not eh best way in case of avoiding collision, any better ideas?

Please advise.

When you do an explicit position change then the physics engine is overridden, even if its processed... every frame you're defining an explicit point so you can pass right through static colliders. You'll need a Drag Rigidbody script/action and I think there is one around here.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D