- Home /
Is there a way to detect object collision detection based on camera perspective rather than direct polygonal collision in game space.
I was recently watching the fantastic "Making of Monument Valley" video on your tube - https://www.youtube.com/watch?t=15&v=mCCC9hQm6MM (11:20) and have been fascinated by their navigation system.
They stated that because of their impossible shapes creating connections between some nodes could not occur in the gamespace, so they built a system that would be able to detect collision/overlap based on perspective and use that information to create a node connection.
I can't seem to find any documentation or information about creating triggers based on 3d overlap/collision based on camera perspective - would anyone be able to point me in the right direction?
Many thanks,
Adrian
Answer by tanoshimi · Apr 04, 2015 at 04:36 PM
I believe the camera in Monument Valley is always fixed, and each interactable object only has a few possible positions/rotations. So I don't think there's any real time "perspective collision" calculations going on - there's a relatively small number of combinations so it's easy to maintain an array of what nodes are connected to each other for every possible level state.
Hmm, I think you may have a point. I tried to find every bit of information on this from the developer but they never say explicitly how they did it. Perhaps they just manually joined them up and had them activate at specific trigger spots.
$$anonymous$$any thanks for your prompt reply!
Answer by _Kyle_1 · Apr 04, 2015 at 04:39 PM
I would start with using a Raycast from the center of the camera and seeing what I can do with that. You might be able to use a raycast to find the distance between both nodes to see if they are close enough to be a connection.
Perhaps you could use oddly shaped colliders that are skewed to look normal from the camera but just like the world would be.
Your answer
Follow this Question
Related Questions
Camera collision 2 Answers
Camera bounce/collision 1 Answer
Is it possible to show only a part of what camera sees? 1 Answer
How to use OverlapCollider? 1 Answer
Perspective distortion makes objects on the edges of the screen "nearer" 0 Answers