rsnerd Posted May 22, 2015 Share Posted May 22, 2015 (edited) for example i'm chopping a oak tree but if i angle myself there is walls blocking it so you can't actually see it despite the client saying it is visible.Is there a way I can tell if the oak tree is actually not visible to the eye etc. Edited May 22, 2015 by rsnerd Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted May 22, 2015 Share Posted May 22, 2015 Don't think so. Quote Link to comment Share on other sites More sharing options...
Joseph Posted May 22, 2015 Share Posted May 22, 2015 Don't think so. what she said Quote Link to comment Share on other sites More sharing options...
Botre Posted May 22, 2015 Share Posted May 22, 2015 It's possible I guess, but not build-in the API and not beginner's stuff either. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted May 22, 2015 Share Posted May 22, 2015 (edited) I suppose it would be possible Use the camera yaw angle to determine what positions are located between the tree and the viewport (not as difficult as it may sound). Find all of the objects in these positions Intersect the model areas of every one of these objects with the model area of the tree. The remaining area (if any) is what should be visible on the screen. Edited May 22, 2015 by FrostBug Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted May 22, 2015 Share Posted May 22, 2015 (edited) I suppose it would be possible Use the camera yaw angle to determine what positions are located between the tree and the viewport (not as difficult as it may sound). Find all of the objects in these positions Intersect the model areas of every one of these objects with the model area of the tree. The remaining area (if any) is what should be visible on the screen. Thats was what I was thinking... but it seems such overkill xD How you determine if the model is infront or behind the object? Edited May 22, 2015 by Khaleesi Quote Link to comment Share on other sites More sharing options...
FrostBug Posted May 22, 2015 Share Posted May 22, 2015 Thats was what I was thinking... but it seems such overkill xD How you determine if the model is infront or behind the object? You could compare the camera yaw angle to the angle between the supposedly blocking object and the tree. If they differ more than ~90 degrees or so, it shouldn't be in front. The yaw angle might need to be translated first, though. Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted May 22, 2015 Share Posted May 22, 2015 You could compare the camera yaw angle to the angle between the supposedly blocking object and the tree. If they differ more than ~90 degrees or so, it shouldn't be in front. The yaw angle might need to be translated first, though. Ya, there is a lot of shit going on to get this idea working though. Would like to see somebody try ^^ Quote Link to comment Share on other sites More sharing options...