tjheldna Posted February 3, 2015 Share Posted February 3, 2015 Pretty sure its a bug. It appears when using Pick in the context below specifying a type. I want to just Pick "Prop" types. local pickInfo = PickInfo() self.mouseCursor = self.mousePointer if self.camera:Pick(mpos.x, mpos.y, pickInfo, .1, true, Collision.Prop) == true then if pickInfo.entity ~= nil then if pickInfo.entity.script ~= nil then local name = pickInfo.entity:GetKeyValue("name") end end end end I've tested with Collision.Prop and Collision.Character and the pick returns true when hit an entity set to "Scene" which I'm sure isn't right. The only time it appears not to pick the entity is if I set the entities collision type to "None". Cheers! Link to comment Share on other sites More sharing options...
josk Posted February 3, 2015 Share Posted February 3, 2015 If you take a look here http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/collision-r778 you can see that Collision.Character and Collision.Prop collide with Scene. You will have to do a check to see if what you hit is a Collison.Prop. Or another way I have done before is SetKeyValue of the items you want to hit and check the name using GetKeyValue. Elite Cobra Squad Link to comment Share on other sites More sharing options...
tjheldna Posted February 3, 2015 Author Share Posted February 3, 2015 Thanks for clarifying that for me josk it is working as expected then. Many Thanks! This can be closed, sorry to waste time. Link to comment Share on other sites More sharing options...
Recommended Posts