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"

How can I send info from a C++ class to a BP?

I have a simple script for buoyancy with the Nvidia Waveworks ocean, but I need a more advanced solution than this. I'm trying to create a system similar to the one described in this tutorial: https://wiki.unrealengine.com/Render_Target_Lookup

I don't have much C++ experience but I believe I have to send the displacement info from the C++ class to the pawn BP and add forces there. My question is how to send this information or access it in the blueprint.

The script from the tutorial, sends displacement data from a render target to the BP: https://wiki.unrealengine.com/Render_Target_Lookup

The script with the Waveworks data I need to send:

.cpp https://pastebin.com/2336qTfG

.h https://pastebin.com/tfM2UCEQ

Any help would be appreciated!

Product Version: UE 4.15
Tags:
more ▼

asked May 21 '17 at 10:23 PM in Blueprint Scripting

avatar image

Lands Unknown
20 2 3

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

1 answer: sort voted first

https://gyazo.com/a4b258fee1513264fdbf3d7addb392a5

Somewhere in your C++ code where you generate your value Call:

https://gyazo.com/c163513515c1d4c065a749abc8ece379

And in any Blueprint who wants to respond to that Event:

https://gyazo.com/d4cd00c23e3c81ce84545a0fe525399a

more ▼

answered May 21 '17 at 11:01 PM

avatar image

Nachtmahr
6.9k 143 26 172

avatar image Nachtmahr May 21 '17 at 11:06 PM

The Broadcast part you probably can put inside OnRecievedWaveWorksDisplacement and pass it OutDisplacements[0] in.

avatar image Lands Unknown May 22 '17 at 01:48 PM

Thanks for the reply! I'll give it a shot and see what happens.

(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