x

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"

Perception: Stimulus WasSuccessfullySensed

I'm having trouble with getting events for stimulus, I did all the set up from the quick start but am not receiving events due to AIPerceptionComponent line 405 if (SourcedStimulus->Stimulus.WasSuccessfullySensed() == false)

Searching the code base I can't find anywhere where WasSuccessfullySensed will be set to true, it returns UPROPERTY(BlueprintReadWrite, Category = "AI|Perception") uint32 bSuccessfullySensed:1; // currently used only for marking failed sight test

Which is always false. Where am I suppose to set this to true? I am not using blueprints.

Thank you Brian

Product Version: UE 4.13
Tags:
more ▼

asked Sep 14 '16 at 08:13 PM in C++ Programming

avatar image

brianfrankenstein
11 1 2 3

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

2 answers: sort voted first

I found the source of the issue, my PeripheralVisionAngleDegrees was 360, which was treated as zero

In creating the Digested Sight Properties UAISense_Sight::FDigestedSightProperties::FDigestedSightProperties(const UAISenseConfig_Sight& SenseConfig)

 PeripheralVisionAngleCos = FMath::Cos(FMath::DegreesToRadians(SenseConfig.PeripheralVisionAngleDegrees));

Equal 1, Which is equivalent to 0 degrees

Then in AISense_Sight::Update() (AISense_Sight.cpp:Line205)

else if (CheckIsTargetInSightPie(Listener, PropDigest, TargetLocation, SightRadiusSq) is always false.

... CheckIsTargetInSightPie(...) ...

return FVector::DotProduct(DirectionToTarget, Listener.CachedDirection) > DigestedProps.PeripheralVisionAngleCos;

Always false when PeripheralVisionAngleCos==1

Using 180 degrees worked

more ▼

answered Sep 15 '16 at 12:22 AM

avatar image

brianfrankenstein
11 1 2 3

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

Found the problem. Successfully Sensed is getting set to true on detecting the player but then getting set to false because of the setting 'Auto Success Range Last from Last Seen Location' . It was set to -1 by default, so the AI detects the player and then fails to detect the player cuz the success range is invalid. If i set this to 0 or greater and then remain at the spot or stay within the defined range of where i was detected by the AI. The successfully sensed remains set to true but if i get out of that range, it gets set back to false and then immediately to true. I have no idea why they added this feature! Its a game-breaker!

The root of the problem that is setting 'successfully sensed' to false

untitled.png (384.9 kB)
more ▼

answered Jun 15 '18 at 10:13 AM

avatar image

StarryFire
6 2 3

(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