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"

Unable to set linear physics velocity in 4.15. Contruction script

I am following one of the scripting tutorials located at the Unreal Engine Youtube channel: Blueprint Quickshot: Expose on Spawn | 11 | v4.7 Tutorial Series | Unreal Engine

After adding the empty actor and the scene and static mesh components, the instructor adds a vector variable makes it public and exposes it on spawn. We enable physics on the static mesh and proceed to the construction script to set up the functionality. We drag the static mesh variable into the construction script and then drag off a node to set the physics linear velocity, that is @ the 2 minutes and 20 seconds mark exactly.

In the version of Unreal I am using 4.15, that node is unavailable in the construction script with this variable. I have tried unchecking context sensitive and not dragging off from the node so I could just create that node and wire them up. It does not appear in the construction script under any circumstances. I did find it on the event graph but that is not where we are using it in the tutorial.

I have a screenshot from the construction script: nable to upload it.

There are a few other options pertaining to velocity but none look like what he is using in the tutorial, has this functionality changed? Am I doing something incorrectly?

Thank you very much.

Product Version: UE 4.15
Tags:
more ▼

asked Jun 10 '17 at 08:49 PM in Blueprint Scripting

avatar image

Shizoma
3 2 4

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

2 answers: sort voted first

Dude, construction script only fires when the actor is created on the level or changed in properties. As far as I know, construction script does not fire when the game starts, it only fires inside the editor before running the game. So what ever your plan is, try to create a function instead and set your velocity there, then try to execute the function inside class BP event graph or level BP event graph. Don't be so obsessive about old or new changes inside the engine. UE4 evolves during times as you should.

Regards.

more ▼

answered Jun 10 '17 at 09:42 PM

avatar image

navid100
1k 29 14 46

avatar image Shizoma Jun 10 '17 at 10:00 PM

Thanks for the answer. I did not see asking a question about functional inconsistencies with the companies own documentation as being obsessive.

avatar image navid100 Jun 11 '17 at 07:53 AM

I did NOT mean to be rude. I just wanted to tell you to not worry about changes, it always happens. I tried to talk more friendly, by the way I apologize for the misunderstanding.

avatar image Shizoma Jun 11 '17 at 07:01 PM

Was there something that then changed in the newer versions? My real curiosity lies with is there a way to accomplish the same action within the construction graph? If not, I just do not understand why they would have originally done it that way. If they change the way something is done, is there an important reason why and does it even matter to me? Thank you again for your help, I am sure I can work out another way to do it. I assumed they did things a certain way for a reason and I just like to understand why so I can use the knowledge effectively.

avatar image navid100 Jun 11 '17 at 10:50 PM

In fact you CAN add 'set physics linear velocity' node to the CS. But first you should create a function and add 'set physics linear velocity' node there and use the function inside the CS. The reason this node does not exist inside the CS is because adding movement nodes into the construction script is not much tangled with the concept of construction script. In fact you can easily do the same things in the tut videos inside the level BP or what ever BP that you use to spawn the actor, while you can't set up a pre-script which can be run inside the editor inside an event graph. Besides adding movement settings to an actor form CS is not an appropriate approach (since CS runs only inside the editor while moving an actor happens after the game has run). So Epic developers decided to leave construction script with more meaningful nodes that only construction script can handle. Inside construction script, developers can create codes that can help them to work easier and faster inside the editor.

function alt text

CS alt text

In general, I believe staff members are trying to make things more organized.

Regards,

function.png (83.4 kB)
cs.png (57.6 kB)
avatar image Shizoma Jun 13 '17 at 08:56 PM

Thank you so much Navid for helping me to understand! This makes sense to me now.

I wish I could rate up your post as the correct answer.

I appreciate the thorough and well explained response.

avatar image navid100 Jun 13 '17 at 09:09 PM

Your welcome, this link may help you,

avatar image Shizoma Jun 13 '17 at 09:12 PM

Derp, thanks rated the answer as correct.

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

Hello Shizoma,

Nope this is same. Maybe the variable type is wrong.

alt text

lineardump.png (43.1 kB)
more ▼

answered Jun 10 '17 at 08:53 PM

avatar image

Sertac Ogan
1.5k 30 10 46

avatar image Shizoma Jun 10 '17 at 09:11 PM

I may have worded that poorly or it may be because I have the cursor over that option, but the option I need to set is the "Set Physics Linear Velocity" which is not in that selection set as shown in the screenshot. Thank you for the answer, it seems to me like velocity and damping are not necessarily the same although I could be wrong. The object is a static mesh with "Simulate Physics" boolean enabled. However, I do not see velocity as an option to adjust in the static mesh's properties. alt text

avatar image Shizoma Jun 11 '17 at 07:11 PM

Is there another way to expose the velocity on spawn Sertac? The goal is to be able to have a publicly editable variable exposed on spawn. Thanks.

avatar image Sertac Ogan Jun 11 '17 at 07:22 PM

You're talking about that.

alt text

editable.png (53.0 kB)
(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