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"

AddDynamic

Why won't this code work? The error is "no instance of function template" alt text

alt text

Product Version: UE 4.13
Tags:
picture1.png (34.9 kB)
picture2.png (25.2 kB)
more ▼

asked Jun 09 '17 at 08:11 PM in C++ Programming

avatar image

k8eee
1 1 3 5

avatar image k8eee Jun 09 '17 at 08:14 PM

My pictures are a little blurry. Here are the important parts. alt text

alt text

alt text

picture3.png (5.0 kB)
picture4.png (4.2 kB)
picture5.png (8.6 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

One big issue I see is with your OnTriggerEnter function.

UprimitiveComponent should be UPrimitiveComponent

If you could post your output that would be most helpful.

more ▼

answered Jun 09 '17 at 08:53 PM

avatar image

HailstoneJosh
226 5 3 14

avatar image k8eee Jun 09 '17 at 09:54 PM

The capital was an issue, but that did not find the problem. Output wasn't showing anything either. But this is the error. alt text

alt text

picture2.png (9.4 kB)
picture3.png (6.9 kB)
avatar image HailstoneJosh Jun 10 '17 at 05:12 AM

The issue still lies within your TriggerEnter definition. The error is saying that the parameters on your function don't match the parameters of the delegate you are binding it to.

These are the required parameters: UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)

It looks like you are missing the initial UPrimitiveComponent parameter.

avatar image RemRemRemRe May 23 '18 at 02:59 PM

Exactly!!! My situation: before:

 void OnHit(AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit );

after:

 void OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit );


I have a slightly impression that the parameter of the function that asocciate with HIT event or OVERLAP event or etc, changed after a big version upgrade of UE4, then it added a

 UPrimitiveComponent* HitComponent

parameter.

after that, My AddDynamic() function works fine~

avatar image derui29 Feb 14 '19 at 06:57 AM

hello friends. i am still having this problem. what would be the solution? the error is exactly the same as that of k8eee above.

(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