Jump to content

Material:SetPickMode broken


Recommended Posts

Sorry if this has already been posted but it seems like Material:SetPickMode is broken. For example this code:

local mat = Material:Create()
	
local shader = Shader:Load("Shaders/Model/diffuse+alphamask.shader")
mat:SetShader(shader)
shader:Release()
	
mat:SetPickMode(true)

Crashes with this error:

attempt to call method 'SetPickMode' (a nil value)

Seems like this should work, this is the documentation for the function:

https://www.leadwerks.com/learn?page=API-Reference_Object_Asset_Material_SetPickMode

Link to comment
Share on other sites

Can confirm - same happens if you try to use GetPickMode(). But interestingly enough it appears that if you set the pick mode via the Material Editor it will work as expected. But just from my small test it appears to be a slow process for it to ignore the object based on the material's pick mode setting - seemed to make the program stutter a bit.

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

  • 7 months later...
  • Josh locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...