whiterabbit Posted November 3, 2014 Share Posted November 3, 2014 I first noticed this on a mesh generated using the Surface class but have also checked it against the default teapot model. The result of a pick ( World:Pick() ) will always have triangle 0 instead of whatever the correct triangle id is. I am using the latest Steam version of Leadwerks and my project is up to date. I'll try to put together a simple demonstration scene but it should be pretty easy for anyone to confirm this. It's pretty much as simple as: local Picked = PickInfo() local Hit = World:GetCurrent():Pick(StartPos,EndPos,Picked,0,true) --true for getting the 'nearest' hit --make sure StartPos and EndPos go through a model print(Picked.triangle) --always 0 Link to comment Share on other sites More sharing options...
whiterabbit Posted November 3, 2014 Author Share Posted November 3, 2014 This map should demonstrate the bug. Start a new project and copy in the map and scripts. Move the mouse to rotate the camera. It does a trace and positions an object there so the trace is definitely working, but the triangle returned is always 0. PickInfo_BugTest.zip Link to comment Share on other sites More sharing options...
whiterabbit Posted November 5, 2014 Author Share Posted November 5, 2014 This is really holding up my development, can anyone confirm this is a bug or I'm doing something wrong? Link to comment Share on other sites More sharing options...
macklebee Posted November 5, 2014 Share Posted November 5, 2014 yes i can confirm, triangle is always zero unless there is some caveat that i am missing 1 Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Josh Posted November 5, 2014 Share Posted November 5, 2014 Thanks... My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted November 5, 2014 Share Posted November 5, 2014 Okay, fix will be on beta branch in a few mintes. 2 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts