Let one camera frustum intersect another's

I am currently struggling with the issue of combining two camera's render outputs. One camera renders orthographic 2D objects (e.g. facing the X/Y plane), the other renders 3D objects overlaid on top of the 2D output.

The 3D camera is an orthographic camera rotated 30 degrees to match the 3D objects to the 2D tile's looks. The car is the 3D objects and the background is placed on the X/Y plane.

Let one camera frustum intersect another's

Now, my troubles arise when moving the cameras up/down. Due to the 30 degree rotation of the 3D camera I can't get their view frustums to overlap perfectly. This results in the 3D content moving a bit faster than the 2D content, resulting in this image (when I move my camera up/down):

GFYCat sample

As you can see, the distance between the car's top and the street is not the same anymore.

My question is, how do I make the 3D camera's frustum match the 2D camera's, but at the same time including the 3d degree rotation.

It'd be awesome if someone could point me in the right direction.

Cheers Philipp

Replay

Category: unity Time: 2016-07-31 Views: 5

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.108 (s). 12 q(s)