Icare Posted October 19, 2010 Share Posted October 19, 2010 Hi ! who can explain to me why my code doesn't work ? If I set the entitytype of the sphere to 20, and the filter too, there isn't result of the linepick, if I set it to 0 it's ok.... local sphere:tmesh=createsphere() EntityType(sphere, 20, 1) Print GetEntityType(sphere) Local pick:TPick = LinePick(Vec3(0, 0, -5), Vec3(0, 0, 10), 0, 20) If pick <> Null Then Print "ok" End If thank, Nicolas Quote Link to comment Share on other sites More sharing options...
Joh Posted October 20, 2010 Share Posted October 20, 2010 The collision type parameter works as follows: Imagine the pick-ray being a physical body with the specified collision type that flies in the pick direction. It'll stop at the first mesh it hits that has a collision type which would collide with it's type. Therefore, for the pick type parameter to work, Collisions must have been used to set up any type (response type doesn't matter) of collision between the pick's type and the mesh's type. So after calling (for example) Collsions(1,2), a pick of type 2 will hit meshes of type 1 and the other way around. In other words you need to specify which Collisions you want. Quote Intel Corei7-6700, NVIDIA GeForce GTX 980, 32GB DDR4, W-10. Link to comment Share on other sites More sharing options...
Icare Posted October 21, 2010 Author Share Posted October 21, 2010 Ok, thank Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.