Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2D Triangle collider?
#2
(17-07-2022, 02:55 AM)bobby Wrote: Hi there,

I'm simulating fluid in 2D mode, and I would like to make a triangle collider. Is there any way to do that? I tried the Edge Collider 2D but it seems like it doesn't work very well.

Bobby

Hi there!

Triangle colliders in 2D are not supported, see the manual:
http://obi.virtualmethodstudio.com/manua...sions.html

Quote:Add a ObiCollider component to any collider in your scene to make it work with Obi. You can add this component to SphereColliders, MeshColliders, BoxColliders... pretty much all standard Unity colliders, both 3D and 2D. The only collider types not currently supported by Obi are PolygonCollider2D and TilemapCollider2D.

The reason for this is that Unity does not expose enough information about those kind of colliders to be able to replicate them on another engine, such as Obi.

Quote:I tried the Edge Collider 2D but it seems like it doesn't work very well.

If you're moving the collider around by setting its transform position, you will likely run into tunneling issues (fluid passing trough the collider) since edges are just lines, they have zero volume. For a static collider or a non-kinematic rigidbody it should work much better since continuous collision detection can do its job.

let me know if I can be of further help,
Reply


Messages In This Thread
2D Triangle collider? - by bobby - 17-07-2022, 02:55 AM
RE: 2D Triangle collider? - by josemendez - 18-07-2022, 08:22 AM
RE: 2D Triangle collider? - by bobby - 18-07-2022, 11:52 AM
RE: 2D Triangle collider? - by josemendez - 18-07-2022, 12:02 PM
RE: 2D Triangle collider? - by bobby - 18-07-2022, 07:30 PM
RE: 2D Triangle collider? - by josemendez - 19-07-2022, 06:55 AM