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"

FViewport::GetHitProxy always null

Hello, I'm trying to draw in game a spline and it's control point to do something close to what is done in editor by FSplineComponentVisualizer.

My issue is that I get always a nullptr from FViewport::GetHitProxy.

Looking what people asked before here I see that it's a common issue and nobody was able to reply with some sort of solution.

I'd like to understand what I should implement to get it working. Anybody can help?

Product Version: UE 4.21
more ▼

asked Dec 12 '18 at 07:32 AM in C++ Programming

avatar image

1 1 2

avatar image pmess Dec 12 '18 at 01:59 PM

Is it normal that when I look for getting hit proxies from a viewport I get with FViewport* Viewport = GetWorld()->GetGameViewport()->Viewport; a Viewport/HitProxyMap/HitProxies that is NULL ?

alt text

avatar image pmess Dec 12 '18 at 02:03 PM

I'm adding the HitProxies in a

class FSplineIGESceneProxy : public FPrimitiveSceneProxy { // ... }


void FSplineIGESceneProxy::GetDynamicMeshElements(const TArray& Views, const FSceneViewFamily & ViewFamily, uint32 VisibilityMap, FMeshElementCollector & Collector) const { for (int32 ViewIndex = 0; ViewIndex < Views.Num(); ViewIndex++) { FPrimitiveDrawInterface* PDI = Collector.GetPDI(ViewIndex);

     FVector From = FVector(100, 100, 100);
     FVector To = FVector(200, 200, 100);


     PDI->SetHitProxy(new HIGEFromHitProxy(From));
     PDI->DrawPoint(From, FLinearColor(0, 1, 0), 20.f, SDPG_World);

     PDI->DrawLine(From, To, FLinearColor(1, 0, 0), SDPG_World);

     PDI->SetHitProxy(new HIGEToHitProxy(To));
     PDI->DrawPoint(To, FLinearColor(0, 0, 1), 20.f, SDPG_World);



that is used by a derived from UPrimitiveComponent

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

0 answers: sort voted first
Be the first one to answer this question
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