Search Unity

Gets the intersection Points on between two EdgeColliders2D on demand

Discussion in 'Scripting' started by dullman, Mar 6, 2016.

  1. dullman

    dullman

    Joined:
    Jan 20, 2015
    Posts:
    29
    Hello i plan to use in my game Vector Based Characters, so basically i want to had intersection of two bezier paths, but since there isn't any c# library who has it, so basically i would either write my own or use another rapport, yesterday i saw that asset has option to create a collider for shape, and after trying it almost fit exactly to created shapes, so to be truthful even if there some problems with precision it should be could enough to use it.
    So what i want is to get intersection points on Demand, I mean there is a method on OnCollisionStay but truthfully i don't need it since i'm only want to check when rotation of object change (to fit one part to another so we had a smooth bounds between two parts of body) so having enabled collider is just bad from performance side.
    Also as there is a method to check if collider is touching, but what i need is to have points of intersection.
     
  2. grimofdoom

    grimofdoom

    Joined:
    Sep 6, 2013
    Posts:
    168
    If you are up for the extra work, you can turn a Vector into a 3D model in Blender (less scripting work required, and more accurate I think). I don't work on visuals currently, but I am pretty sure that Blender will keep the Vector's material as a new material and automatically apply it.
     
  3. dullman

    dullman

    Joined:
    Jan 20, 2015
    Posts:
    29
    You see i was thinking about if it possible to turn vector shapes into something like 3d models, but you see current asset i had load on runtime svg file as a mesh, which also i can change the shape on runtime (by changing points on path), whilst the same is available in 3d models as morphs (blendshapes), it rather easier to operate on vectors than 3d model (as basically i do not even know about theory for 3d graphics so basically i'm only able to use preexisting models with slight modification, any more advanced techniques like creating morphs it's somewhat alien for me).