Hi!
I tried to cameraPick animMeshes and meshes.
Meshes work fine, but animMeshes not.
I use:
...to draw a box around the objects, as feedforward.
Can't I pick animMeshes at all?
I tried to cameraPick animMeshes and meshes.
Meshes work fine, but animMeshes not.
I use:
Function targetbox(ent) If ent=0 Return 0 If EntityInView(ent,camera)=0 Return 0 CameraProject camera,EntityX(ent),EntityY(ent),EntityZ(ent) leftmost#=ProjectedX() rightmost#=ProjectedX() topmost#=ProjectedY() bottommost#=ProjectedY() ;RuntimeError (leftmost#+" "+rightmost#+" "+topmost#+" "+bottommost#) For i=1 To CountSurfaces(ent) s=GetSurface(ent,1) For v=0 To CountVertices(s)-1 TFormPoint VertexX(s,v),VertexY(s,v),VertexZ(s,v),ent,0 CameraProject camera,TFormedX(),TFormedY(),TFormedZ() If ProjectedX()<leftmost leftmost=ProjectedX() If ProjectedX()>rightmost rightmost=ProjectedX() If ProjectedY()<topmost topmost=ProjectedY() If ProjectedY()>bottommost bottommost=ProjectedY() Next Next Rect leftmost,topmost,rightmost-leftmost,bottommost-topmost,0 End Function
...to draw a box around the objects, as feedforward.
Can't I pick animMeshes at all?