Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

White crosshair

Hi there,

I followed some tutorials on creating crosshairs, whatever I do, I end up with a white square. Any clue why is that happening?alt text

Product Version: Not Selected
untitled-1.jpg (105.7 kB)
more ▼

asked May 18 '15 at 07:38 AM in Using UE4

avatar image

61 10 13 17

avatar image PixelOmen May 18 '15 at 07:50 AM

Could you post your HUD blueprint, or whatever you're using to draw the corsshair?

avatar image wolf5659 May 18 '15 at 12:26 PM

Thank you for your reply, will do once I get back home from work :D

avatar image wolf5659 May 19 '15 at 06:45 AM

Here you go siralt text

untitled-1.jpg (278.5 kB)
avatar image 2rusbekov May 18 '15 at 09:10 AM

May be your crosshair is white square? no alpha?

avatar image wolf5659 May 18 '15 at 12:27 PM

Nope... It isn't just a white square without an alpha lol

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Hello, wolf5659

Please note that in C++, you can draw the crosshair like this:

 AMyHUD::AMyHUD(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
     static ConstructorHelpers::FObjectFinder<UTexture2D> CrosshiarTexObj(TEXT("/*path to the texture*/"));
     CrosshairTex = CrosshiarTexObj.Object;
 void AMyHUD::DrawHUD()
     const FVector2D Center(Canvas->ClipX * 0.5f, Canvas->ClipY * 0.5f);
     const FVector2D CrosshairDrawPosition( (Center.X - (CrosshairTex->GetSurfaceWidth() * 0.5)),
                                            (Center.Y - (CrosshairTex->GetSurfaceHeight() * 0.5f)) );
     FCanvasTileItem TileItem( CrosshairDrawPosition, CrosshairTex->Resource, FLinearColor::White);
     TileItem.BlendMode = SE_BLEND_Translucent;
     Canvas->DrawItem( TileItem );

Hope this helped!


more ▼

answered May 18 '15 at 02:55 PM

avatar image

Andrii Melnyk
1.8k 60 19 112

avatar image wolf5659 May 19 '15 at 06:44 AM

I never used C++ :(

(comments are locked)
10|2000 characters needed characters left

You probably imported a .JPG file which isn't transparent, try importing a .PNG file and see if that works.

more ▼

answered Oct 04 '16 at 08:20 PM

avatar image

604 34 26 42

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question