Jump to content

Terrain not pickable


shadmar
 Share

Recommended Posts

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

  • Upvote 1

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...