Jump to content

bent intersection line


photo

Recommended Posts

image.png.d21746bbc0ae3b39a40cf2b15e1c8d64.png

Can I draw a non-straight-line intersection line at once?

Currently, the intersection function seems to be able to specify only two points.

Link to comment

I tried to make a checkable line by following the movement of my hand because of my need.

 

I tried to use the bone points to create a changing collision line, but if one intersection is not possible, I'll create multiple intersections to create logic.

 

image.png.b811eef5b93b2993345e808fe0f33e60.png

Link to comment

Can I use multiple getIntersection() function by one WorldIntersectionPtr variable?

 

Or is it only one-to-one matching?

I am currently using intersection like this sample.

//--------------

ObjectPtr o;

    WorldIntersectionPtr wi = WorldIntersection::create();

    o=World::get()->getIntersection(hand->getWorldBoneTransform(1).getTranslate(), 
        hand->getWorldBoneTransform(2).getTranslate(), 1,wi);
    if (o)
        value |= 0x00000001 | 0x00000002;
    o = World::get()->getIntersection(hand->getWorldBoneTransform(2).getTranslate(),
        hand->getWorldBoneTransform(3).getTranslate(), 1, wi);
    if (o)
        value |= 0x00000001 | 0x00000002;

Link to comment

Hi Dongju,

Can I use multiple getIntersection() function by one WorldIntersectionPtr variable?
Yes, of course! WorldIntersection is used for result only. getIntersection() doesn't read any information from it.

Best regards,
Alexander

  • Like 1
Link to comment
×
×
  • Create New...