Jump to content

bent intersection line


photo

Recommended Posts

Posted

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.

Posted

Hello Dongju,

Yes, intersection ray is cast from one point to another, it can't be represented as a broken line.

May I ask you why do you need the decribed solution?

Thanks.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

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

Posted

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;

Posted

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
×
×
  • Create New...