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"

Changing world gravity on sequencer

So I'm doing a scene where I want basically all of the meshes to have 0 gravity at one point and then return to normal. All of this on a sequencer since its not a game what I'm doing. With this in mind I am making a bp actor for every mesh that lets me change gravity to whatever number I want on the sequencer, but, there are too many meshes, and, I really think there is a way to change the gravity of all meshes at the same time on the sequencer somehow. Still, I don't know how and this is why I am asking here today, does someone know a solution?

Product Version: UE 4.17
Tags:
more ▼

asked Apr 22 '19 at 05:11 PM in Blueprint Scripting

avatar image

Agente Dog
1 1 2

avatar image mercuriusfm Apr 23 '19 at 05:30 AM

Might be possible if you make a variable for gravity that can be changed with a timeline.

avatar image Agente Dog Apr 23 '19 at 08:47 PM

I agree with you, but, I have no idea how to do it.

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

2 answers: sort voted first

If you make an event track in your level sequence then add a key frame to it you can double click that keyframe to create a new function in the sequence director (this is basically another type of blueprint). In this new function you can do something like this. More information on event tracks can be found in the docs.

alt text

Of course, you get you should probably get only the actors of your custom type instead of all actors. Additionally, without more information I am not sure how you are changing the gravity, but it seems like you have that bit sorted already :) But just in case I'll mention, you could use this sequence director function to get all actors of your custom type, cast to that type, then call an event you've made on your custom actor that uses a timeline to slowly turn gravity off instead of all at once.

more ▼

answered Apr 24 '19 at 05:58 AM

avatar image

mr137
106 1 3 3

avatar image Agente Dog Apr 24 '19 at 05:24 PM

Hi! Thank you for your answer. I'm not home yet so I can not try it yet but there is something I would like to ask :D. What do you mean by:

you could use this sequence director function to get all actors of your custom type

Do I have to make a custom type, group them or something like that? And how?

I do have it figured out, but, this is the way I do it. As you can see it is an actor blueprint which lets me add a gravity option on the sequencer, but, I have to do it mesh by a mesh which is time-consuming, so, you just helped me a LOT. Thank you and I hope you can explain me this :D

avatar image Agente Dog Apr 24 '19 at 08:05 PM

I was chicken and I use the 4.17 version of unreal which means I can't do that. Still, thanks for the help.

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

I don't have 4.17 installed, sorry about that. But if you have the ability to call functions from sequencer that are on actors, then the same principle I showed above should be fine. Make a new actor blueprint add it to sequencer and call a custom function on it that gets all the actors that you wish to change the linear velocity of.

I am not sure how you have set up your map whether you made a custom actor blueprint type for objects that should be affected by gravity or whether you just dragged static meshes into scene.

If it is the first one, then the use the "GetAllActorOfClass" and for the actor class parameter choose your custom actor blueprint type. If it is the second thing, you could use "StaticMeshActor " as the parameter (but this will get all static meshes including wall, floors etc so probably not what you want). So you probably want a way to indicate which meshes should be affected by this gravity effect and which ones not.

Two ways come to mind:

  1. Make an actor blueprint and add a static mesh component to it, then for each static mesh you placed in your scene replace it with this blueprint and set it to the correct mesh in scene (this will take a while because you have to replace all the things in your scene you want affected).

  2. Or alternatively, select all meshes in your scene you want to affect then in editor scroll down to tags on the right-hand side and add a new tag to them all, say "anti-grav", then in a new actor blueprint function you intend to call from sequencer make a "GetActorsWithTag" node to get them all and then loop over them and set the linear velocity as you wish.

more ▼

answered Apr 24 '19 at 10:21 PM

avatar image

mr137
106 1 3 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