Hi,
Educational Game for K-2nd Grades.
Take photos of animals to identify.
I am trying to create an in-game camera that can zoom into a targeted animal that only lists the animals in the in-game camera’s FOV. Using 90 degrees.
This all works except…
When a picture of an animal, say zebra is taken, there is only 1 zebra with a unique ID in the camera lens but it is listing all the zebras in the level and not just in the in-game camera’s FOV.
Having trouble need help. I think the problem is not using the FOV node correctly.
Thanks.
It’s hard to say without knowing how you’re getting animal references.
In any case, there’s a useful node called [Was Actor Recently Rendered] that can tell you if the actor is actually seen on the screen. It might help.
Thanks to everyone for replying. Sorry for the delayed response. A little background.
I allow students to use Unreal for 3D software designs. I am getting better at this myself, but this problem stumped me.
This is intended to be an education video. K-2nd grade. Students complete missions like taking photos of 4 zebras. Each photo is taken by a hand held camera in the game and they can zoom into the zebra.
When the picture is taken, it is suppose to record how many zebras are in the FOV of the camera. But instead it is recording every zebra in then area, even behind the player. Behind the player there is no FOV, or shouldn’t be.
The blueprint is a mess and I had to break it up in three images.
What does not work is the number of zebras in the photo may be one, but the output string is showing most of the zebras in an area equal to the third person starter platform. This should only record the zebra/zebras in the camera lens and not the area.
My guess is that the FOV of the camera would be needed to cover only that 90 degree angle.
I have a feeling that “ConvertWorldLocationToScreenLocation” is returning actors behind the camera because you are converting 3D to 2D and losing the information if an animal is in front or behind the view. You could add an additional check like " WasRecentlyRendered" to each animal actor, or test if “FindLookAtRotation” is not pointing towards the opposite direction of the camera’s rotation.
I want to thank you.
This was a mostly fix, but good enough.
He used the " WasRecentlyRendered" node. This removed all animals outside of the in-game camera FOV. Called BP_Camera.