Jump to content

PickInfo.triangle is always 0


Recommended Posts

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

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...