# Are you clever? Distance Problem.

This topic is 667 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Spent 2 months

Edited by paulgriffiths

##### Share on other sites

Solved: though if

Edited by paulgriffiths

##### Share on other sites

Edited by paulgriffiths

##### Share on other sites

Found a

could be at any angle like rotated 180.

Edited by paulgriffiths

##### Share on other sites

Think I may get somewhere, may involve Pythagorean theorem, or the areas of triangles?

Edited by paulgriffiths

##### Share on other sites

I think I've worked it out, some angles are positive and some are negative, got to work them out.

Simpler than that, calculate if portals rotated by <>180 and then do distance plane equation, simple!

Edited by paulgriffiths

##### Share on other sites

If your portals are planar polygons, which portal a ray from the camera sees can only change

• at the edges of a portal
• at the intersection of two portals

Distances between portals and camera do not matter, except to define depth buffers that can be used.to locate portal edges and intersections in screen space.

You also don't seem to clip portals against the view frustum of your camera.

##### Share on other sites

edit:

Edited by paulgriffiths

##### Share on other sites

a reliable way to know if the camera is behind the portals and which portal is the furthest away?

Edited by paulgriffiths

##### Share on other sites

edit:

Edited by paulgriffiths

1. 1
2. 2
Rutin
21
3. 3
A4L
15
4. 4
5. 5

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633742
• Total Posts
3013629
×