Download

(39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

Very handy stuff as usual. Thanks Rama and all the contributors!

Great to hear from you as always Jacky!


I now got the picture where Kris demonstrates how his SceneCaptureComponent2D projection code works! Full details below!

These nodes are in my Victory BP Library already!

**Nodes by Kris**

Kris has offered us an easy way to project the results of a SceneCapture or SceneCaptureComponent2D !

This is very useful for making minimaps!

![Capture2DProject.jpg|1047x729](upload://z58uCuMnVJQAwPzLeYOCStkE6Lh.jpeg)

http://i.imgur.com/piZKZNe.jpg

**C++ Code**

I thought Kris's project node was particularly neat!

Here's the code for it!



```


bool UVictoryBPFunctionLibrary::CaptureComponent2D_Project(class USceneCaptureComponent2D* Target, FVector Location, FVector2D& OutPixelLocation)
{
    if ((Target == nullptr) || (Target->TextureTarget == nullptr))
    {
        return false;
    }
    
    const FTransform& Transform = Target->GetComponentToWorld();
    FMatrix ViewMatrix = Transform.ToInverseMatrixWithScale();
    FVector ViewLocation = Transform.GetTranslation();

    // swap axis st. x=z,y=x,z=y (unreal coord space) so that z is up
    ViewMatrix = ViewMatrix * FMatrix(
        FPlane(0,    0,    1,    0),
        FPlane(1,    0,    0,    0),
        FPlane(0,    1,    0,    0),
        FPlane(0,    0,    0,    1));

    const float FOV = Target->FOVAngle * (float)PI / 360.0f;

    FIntPoint CaptureSize(Target->TextureTarget->GetSurfaceWidth(), Target->TextureTarget->GetSurfaceHeight());
    
    float XAxisMultiplier;
    float YAxisMultiplier;

    if (CaptureSize.X > CaptureSize.Y)
    {
        // if the viewport is wider than it is tall
        XAxisMultiplier = 1.0f;
        YAxisMultiplier = CaptureSize.X / (float)CaptureSize.Y;
    }
    else
    {
        // if the viewport is taller than it is wide
        XAxisMultiplier = CaptureSize.Y / (float)CaptureSize.X;
        YAxisMultiplier = 1.0f;
    }

    FMatrix    ProjectionMatrix = FReversedZPerspectiveMatrix (
        FOV,
        FOV,
        XAxisMultiplier,
        YAxisMultiplier,
        GNearClippingPlane,
        GNearClippingPlane
        );

    FMatrix ViewProjectionMatrix = ViewMatrix * ProjectionMatrix;

    FVector4 ScreenPoint = ViewProjectionMatrix.TransformFVector4(FVector4(Location,1));
    
    if (ScreenPoint.W > 0.0f)
    {
        float InvW = 1.0f / ScreenPoint.W;
        float Y = (GProjectionSignY > 0.0f) ? ScreenPoint.Y : 1.0f - ScreenPoint.Y;
        FIntRect ViewRect = FIntRect(0, 0, CaptureSize.X, CaptureSize.Y);
        OutPixelLocation = FVector2D(
            ViewRect.Min.X + (0.5f + ScreenPoint.X * 0.5f * InvW) * ViewRect.Width(),
            ViewRect.Min.Y + (0.5f - Y * 0.5f * InvW) * ViewRect.Height()
            );
        return true;
    }

    return false;
}    


```

Holiday Special

See the upper 3 posts for my Victory BP Library Holiday Special!

Rama

Your “Get all widgets of class” is just AWESOME. Thank you so much :smiley:

Hee hee! Glad you like it!

It will be in the Engine in 4.7, available for everyone’s use!

Epic accepted my C++ code via Git hub pull request!

Happy Holidays!

Rama

60+ Extra BP Nodes For You!

No c++ required!

No compile required!

Download and plug in!

Latest plugin download is here:

:slight_smile:

Rama

I just finished writing and have now uploaded a new version of my plugin which includes a node to verify what OS is being used!


**Get OS Platform**

![OSGet.jpg|900x648](upload://eNzihXcczOhCUpPNreSTACtc4Vt.jpeg)

**Platforms you can check for:**

**Windows
Mac
Linux

PS4
XBoxOne

iOS
Android

HTML5

WIN RT
WIN RT ARM**

Enjoy!

Rama

New Node: Get Attached Actors!

This is a new node as of 12/28/14!

6479f768e3b04ce91adf4d10d4353b8279fbf80f.jpeg

This node gets all actors that are attached to the input Parent Actor!

This node was originally inspired by Sahkan!

Here’s the final C++ code I created for this node:



void UVictoryBPFunctionLibrary::Actor__GetAttachedActors(AActor* ParentActor,TArray<AActor*>& ActorsArray)
{
	if(!ParentActor) return;
	//~~~~~~~~~~~~
	
	ActorsArray.Empty(); 
	ParentActor->GetAttachedActors(ActorsArray);
}


Holiday Special

See the upper 3 posts for my Victory BP Library Holiday Special!

Rama

BP Node to Get Your Computer’s IP Address!

Dear Community,

I’ve finally succeeded at implementing a node that many have been trying to implement since the Beta!

This is a BP node that gets the IP address of your computer!

My node relies on http://api.ipify.org, a free and easy way to get your current IP address.

Because this node involves an HTTP request I can’t make it a static library node, so I instead made a VictoryPC class that contains only this functionality.

You can easily re-parent your current player controller blueprint to use my plugin VictoryPC class!

File->Reparent

and if you are not using a PC already, make sure to go to World Settings and use my VictoryPC as your player controller!

As long as my Victory BP Library is an active plugin for you, then this VictoryPC class will show up!

Download:


**Celebration!**

Yay!

Now we can all get the IP address of the local computer for use with multiplayer games or webserver activities!

Enjoy!

Rama

Pic

Here’s the setup you should create in your Blueprinted version of my VictoryPC!

2902549c08d489d31bb43f8a7049793370d4801e.jpeg


**C++ Source Code For You**

Here is the C++ source code I wrote for this node!



```


bool AVictoryPC::VictoryPC_GetMyIP_SendRequest()
{
	FHttpModule* Http = &FHttpModule::Get();
	
	if(!Http)
	{
		return false;
	}
	 
	if(!Http->IsHttpEnabled()) 
	{
		return false;
	} 
	//~~~~~~~~~~~~~~~~~~~
	
	FString TargetHost = "http://api.ipify.org";
	TSharedRef < IHttpRequest > Request = Http->CreateRequest(); 
	Request->SetVerb("GET");
	Request->SetURL(TargetHost);
	Request->SetHeader("User-Agent", "VictoryBPLibrary/1.0");
	Request->SetHeader("Content-Type" ,"text/html");
 
	Request->OnProcessRequestComplete().BindUObject(this, &AVictoryPC::HTTPOnResponseReceived);
	if (!Request->ProcessRequest())
	{
		return false;
	}
	  
	return true;
}
	
void AVictoryPC::HTTPOnResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
{
	this->VictoryPC_GetMyIP_DataReceived(Response->GetContentAsString());
}
 


```



♥

Rama

Victory BP Library Holiday Special!

Several community members contributed to my Victory BP Library Holiday Special!

Rama’s BP Library Holiday Special

Enjoy!

Rama

Rama’s Suite of Powerful UMG Nodes

Here are the 3 core BP nodes that I’ve been using to make all of my complicated interacting UMG menus, including an in-game file browser and a menu that allows you to change the materials on any skeletal mesh, while in-game!

These nodes are available to you now!


**Get All Widgets of Class**

Allows you to not have to store references everywhere to your widgets, making it easy to interact with the Player Controller and My Character blueprints :) 

Also makes it easy to remove a loading screen after a level transition, without storing refs in Game Instance class

Remove All Widgets Of Class

You can find and remove any widget any time this way, no matter where you are in BP! (here I am in the Level BP)

Rama Tip:
If you make a general superclass for all your widgets (Reparent to a blank UserWidget of your own making), you can clear your entire UI system from the viewport with a single call to RemoveAllWidgetsOfClass, supplying the class that is your super class for all your user widgets!

So lets say you have 3 user widgets that you made, make a 4th that is blank, reparent your existing 3 to your new empty 4th widget (“WidgetMaster” for example).

Now you can just call RemoveAllWidgetsOfClass on your new 4th widget, WidgetMaster, and all 3 of your existing widgets will be removed automatically from the viewport!


**Is Widget Of Class In Viewport**

Take action based on the dynamic lookup of whether a certain widget is currently visible!

No need to store refs or bools anywhere, just do a dynamic look up that is lightning fast!

♥

Rama

![9b7a621d3332fdafbe78b687447eb1c37f3f558c.jpeg|1035x750](upload://mbqdc9TTsCkJHaeTMyxg2GR6Hak.jpeg)

2d16db46320c67967ee1942b4e35742031880893.jpeg

**Set Volume of Any Sound Class

Any Time From Anywhere!**

This is a node that Hourences requested I make!

You can use this node to set the volume of any sound class, any time, from anywhere!

I am aware of the option of using a sound mixer, however it is not as dynamic because you have to use fixed sound increments.

**My node allows you to offer people an audio slider that is a continuous float value range based only on the slider increments.
**
Enjoy!

Rama

Wiki Download Page

Rama, is does your plugin package in the latest 4.7 Preview without C++/Source?

Someone else will have to let us know about that, I am too busy coding AI to try out the 4.7 preview, on a tight schedule :slight_smile: but if anyone finds out if it works let me know!

Rama

2D Interpolation Functions for UMG and 2D Game Animations

**Using these nodes in my plugin you can now easily make your own translation animations for 2D games and UMG!
**
I realized the need for these animations while trying to manually animate UMG widgets in BP.

I am in process of submitting this as a pull request for the main engine.

UE4 Wiki, Plugin Download Page

Enjoy!

Rama

60+ Extra BP Nodes For You!

No c++ required!

No compile required!

Download and plug in!

Latest plugin download is here:

:slight_smile:

Rama

Thanks Rama! They just released Preview 2 of 4.7 so i’m going to give it a try. Kind of have to since i’m on a deadline too. Really appreciate the work you’ve done for us!

Let me know how it goes!

Soon as 4.7 release comes out I will be updating!

:slight_smile:

Rama

Accepted by Epic

These two nodes will be in a near future engine release!

Epic accepted my C++ pull request here (need active github account to view this):
https://github.com/EpicGames/UnrealEngine/commit/c0f63f5a09613320fa1056e174dfa7f2c3b39098

**Using these nodes in my plugin you can now easily make your own translation animations for 2D games and UMG!
**
I realized the need for these animations while trying to manually animate UMG widgets in BP.

UE4 Wiki, Plugin Download Page

Enjoy!

Rama