Try my new website: www.urcho.com - the new SIMPLE social network
blitz code snippets Sign up | 287 members | 114 snippets
Search for:

Username:
Password:


See if an Entity is in View by Berbank

[back]
Author: Archive | Viewed: 634 times | Language: BlitzBasic 3D | Category: Maths/Physics
Author Comments:
Havent properly checked this yet, but it seems to work. There are other code fragments out there that do similar things but couldnt find anything that did this in such a specific way. Simply use like this: If InView(EntityA,EntityB,ViewAngle,RangeValue) debuglog("A can see B) else debuglog("A cant see B) endif This is for 2D worlds and make sure the objects have zero pitch and Roll (are not rotated on the X or Z axis). Does not take into account occluding objects.
Login or create an account to comment on this snippet