Jump to content

World::get()->getIntersection() problems


Recommended Posts

Hi, when I used World::get()->getIntersection(controller[num]->getWorldBoundBox(), intersections) to detect intersections objects

Sometimes, even my controller has already collided with the objects, but in the Vector<Objptr> intersections, I still couldn't detect the object. (I printed all the obj, but the target object doesn't show)

as the picture below shows, the controller already collides with the hook.

Untitled48.png.6e9cec7972b18da5e422666c9d2d3d71.png

And if I changed the hook's position (such as rotating the winch) or the helicopter's position (the vive tracker), it will detect the hook again. it seems only in some areas or angles that the intersection can't detect properly. The correct scenario should be like this:

Untitled49.png.45d8a6ed71ad4692e56833424659359a.png

and the malfunction phenomenon happens randomly, and really boring

are there anything I missed or need to pay attention to when using  World::get()->getIntersection() ? 

Thanks

 

Link to comment

Hi Lukas,

For debugging purposes you can try to visualize object's bounds and controller ray to find out what is really happens. Maybe adding some more rays or extending their length will also help.

If you can prepare a really small test example on a blank world - we can check more closely.

Thanks!

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

Link to comment

 

AppWorldLogic::init :()

{

Visualizer::get()->setEnabled(1);

}

AppWorldLogic::update()

{

 Visualizer::get()->renderNodeBoundBox(Editor::get()->getNodeByName("door_handle"), vec4(1.0f, 0.0f, 0.0f, 1.0f));

}

 

Does this work in VR environment? I cannot see any bound box in VR .

Link to comment

Lukas,

You can try to grab AppVive plugin (dll) from the 2.6.1.1 SDK. Visualizer is fixed in this build. Or you can manually rebuild the AppVive plugin and add following line in source/plugins/App/AppVive.cpp:

viewport->setSkipFlags(0);

after

viewport = Viewport::create();

at line 87.

Thanks!

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

Link to comment
×
×
  • Create New...