Announcement

Collapse
No announcement yet.

Create frustum check from location not camera

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Create frustum check from location not camera

    Hello everyone.

    I've been looking to try and get a frustrum check from actor location.

    I know there are ways to use the camera to do this but I'd like to get it to check from the center of the actor location.

    This is because the camera can move between 3rd person and first.

    Ideally one could have its location fix in the center of actors location but get its rotation from the cameras rotation so they are looking in the same direction.

    Any help is appreciated.
    Inphidel / Brian - Developer of Ultraball
    http://www.ultraballgame.com

    Don't shy away from bugs in your game. Don't play it as intended. Break your game so you can fix it!

    #2
    A frustum check is done by checking if an object's bounds sphere and box is within the camera frustum which defined by 6 planes (near clip plane, far plane and top/bottom/right/left).

    Click image for larger version

Name:	vf.gif
Views:	1
Size:	6.6 KB
ID:	1114044

    So when you say "from the center of actor location" you mean an arbitrary camera location/rotation?

    First step would be to actually define the frustum
    Second step would be plane to box/sphere intersection math.

    4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
    WIP Interactive Water Shader, WIP 2D Water Sim
    WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

    Comment

    Working...
    X