How to figure out if something can be seen by the player in BP?

I need to know if the player is able to see a certain actor/component or not in my game, but I can’t figure out how to do this in Blueprint, and if it is even possible at all?

I can do traces from the player camera, but that traces from the actor, not from what the camera actually sees. I can do forward vector trace but I don’t have much luck with that either. I want to know if the camera currently displays this actor. That would open up a wide number of gameplay possibilities.

So I basically want to retrieve “IsCurrentlyFrustrumCulledByCamera” true false, or something along those lines.

It seems we should certainly expose Get Last REnder Time to BLueprint-land, I added a request for that, small change!

Dear Sjoerd,

#Plugin For You

I made a Blueprint Node Library for you as a plugin,

BP library nodes can be used in any graph including Animation Node Graphs!

I wrote two functions

one retrieves an array of all recently rendered actors

the other retrieves an array of all actors not rendered recently

I’ve tested it as working!

You can decide what qualifies as “recently”

I default to 0.01 seconds, which is just a few ticks

#Get Name as String

I also wrote a get name as string function so you can easily tell if the Recently Rendered function is working or not using the Print node :slight_smile:

anyone can download this blueprint library as a plugin here
http://forums.epicgames.com/threads/977316-Rama-s-Blueprint-Function-Library-As-a-Plugin-For-You


Let me know how it goes for you!

Rama

#Line of Sight Check

In the c++ there is a function for controllers / the real camera

/**
00132: * Checks line to center and top of other actor
00133: * @param Other is the actor whose visibility is being checked.
00134: * @param ViewPoint is eye position visibility is being checked from. If vect(0,0,0) passed in, uses current viewtarget's eye position.
00135: * @param bAlternateChecks used only in AIController implementation
00136: * @return true if controller's pawn can see Other actor.
00137: */

UFUNCTION()
00139: virtual bool LineOfSightTo(const class AActor* Other, FVector ViewPoint = FVector(ForceInit), bool bAlternateChecks = false);

Do you have a code-based project where you could compile BP library functions?

I could make this function into a callable BP library function if you can compile it

:slight_smile:

Rama

#Last Render Time

Again in the c++ is

Actor.h
 /** Returns the most recent time any of this actor's components were rendered */
01579: virtual float GetLastRenderTime() const;

if you can compile C++ code I can make you a blueprint library for these

:slight_smile:

Rama

#see higher up for non-compile solution

Hello Rama

Is it possible to download your ‘blueprint library as plugin’?
When I follow your link, it says that I don’t have permission to do that :frowning:

Hello,

This is a question from the beta version of the engine. We are marking this answered for tracking purposes. If you are experiencing an issue similar to this please post a new question.

Thank you.