UE3 - UT3 PostRendering

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Phoenix_Wing

Official Kantham Stalker
Mar 28, 2008
386
0
0
California
How would I use PostRender to draw an Icon above an actor? I want it just like the Onslaught Orb, but make it so you can see it through walls. I want it so people know that the actor is there. I tried using the one in the onslaught orb, but i'm not sure I did it quite right. I don't want to use a custom texture, just the words Target A and a little Icon around it.

How would I go about accomplishing this?

Thanks if you can help

-Phoenix
 
Last edited:

Phoenix_Wing

Official Kantham Stalker
Mar 28, 2008
386
0
0
California
Ok I have given up on using the PostRenderFor function as it was never called. I decided to use my own function called from the my Pawn class that tells the Target its canvas so it can draw on it. However im getting some strange errors

Pawn:

Code:
simulated function Tick(float DeltaTime)
{
	UTSDGame(WorldInfo.Game).TarA.PostRenderTarget(UTPlayerController(Controller).myHud.Canvas);
	super.Tick(DeltaTime);
}

I have my target stored as a variable in the game class so i can reference it, then I call the Controller, then the Controller's HUD, then the HUD's Canvas. However I get Accessed None 'Controller' Error in my Log which seems impossible as I would not be able to move in game right? It seems very strange...

Here is my function in the Target if it helps
Code:
simulated event PostRenderTarget(Canvas Canvas)
{
	Canvas.SetPos(Location.X, Location.Y);
	Canvas.DrawText(TargetString);
        `log("I Post Rendered!");
}

I want it to draw the words Target A at the location of the Target.

Can anybody shed some light on this?

EDIT: Alright I found out that the Controller only exists after the game begins (silly me :rolleyes:) however I now get an Accessed None 'Canvas' error.

Does the Canvas not exist in Deathmatch games?
 
Last edited:

Phoenix_Wing

Official Kantham Stalker
Mar 28, 2008
386
0
0
California
Alright too many edits. I think I found out the problem that was causing the error... however I just decided to move the draw function onto the custom HUD which seemed a lot easier. I only have one question now, How would I draw an icon just above my actor on the HUD? Using the Location.X and Location.Y does not draw it on the HUD probably because they are two different kinds of vectors. Thanks in advance!