shadmar Posted September 15, 2013 Share Posted September 15, 2013 Not sure if it was before, or not implemented yet. Simple test : Create a terrain with some simple elevation Add this to App:Start() --Create a sphere to indicate where the pick hits local picksphere = Model:Sphere() picksphere:SetColor(1.0,0.0,0.0) --picksphere:SetPickMode(Entity.SpherePick) local pickradius = 0.1 picksphere:SetScale(pickradius*2.0) for x=0,1000 do local pickinfo = PickInfo() x,z = Math:Random(-100,100),Math:Random(-100,100) if (self.world:Pick(Vec3(x,100,z),Vec3(x,0,z),pickinfo,pickradius,true)) then local ps = picksphere:Instance() ps:SetPosition(pickinfo.position) end end 1 HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Josh Posted September 15, 2013 Share Posted September 15, 2013 You are correct. As a temporary solution you can called Terrain::Pick() with the same parameters. 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...
shadmar Posted September 15, 2013 Author Share Posted September 15, 2013 Attempt to call method Pick (a nil value). I guess it wasn't exposed to lua. HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Josh Posted September 15, 2013 Share Posted September 15, 2013 You are correct. Will fix. 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...
beo6 Posted September 16, 2013 Share Posted September 16, 2013 mhh. odd. in my FPS_test project it seems to work with this line: self.camera:Pick(shw, shh, pickinfo, 0, true) Link to comment Share on other sites More sharing options...
Josh Posted September 16, 2013 Share Posted September 16, 2013 Camera picking is a different overload, actually. There is an internal Entity::Pick command used by all the pick routines. 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...
Admin Posted September 18, 2013 Share Posted September 18, 2013 Fixed for next build. Link to comment Share on other sites More sharing options...
Recommended Posts