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"

Why UPathFollowingComponent::IsBlocked() is not virtual?


I am using Unreal Engine 4.12.5 and make extensive use of PathFollowingComponent. For some reason method UPathFollowingComponent::IsBlocked() is declared non virtual:

bool IsBlocked() const;

I need to customize it's functionality (take in consideration rotation of an object in addition to it's position), but the fact that I can not override it makes it horribly uncomfortable. Can you please make it virtual or otherwise explain me why this architecture was implemented in this way (maybe it's intended design)?

Thanks in advance, Maria.

Product Version: UE 4.12
more ▼

asked Sep 01 '16 at 02:03 PM in C++ Programming

avatar image

58 2 5 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

IsBlocked is producing result based on data gathered by regular UpdateBlockDetection calls, which in turn is virtual. I suggest overriding UpdateBlockDetection and producing (forgering!) own data. You'll just have to look at how IsBlocked uses the data to fake if effectively :)



more ▼

answered Sep 01 '16 at 02:36 PM

avatar image

MieszkoZ STAFF
7.3k 225 57 413

avatar image mchernykh Sep 01 '16 at 04:08 PM

Thank you very much for such fast answer! I think I grasped your idea, but it still seems a little bit hacky to me :) Although in current surcumstances maybe it's the best solution. Best regards, Maria.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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