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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How can i enable physics when overlap?

How can i make an actor (cube for example) fall from the top? I mean i have a cube that is static on the ceiling and when i overlap something i want it to fall down.

Product Version: UE 4.21
more ▼

asked Feb 01 '19 at 12:35 AM in Blueprint Scripting

avatar image

6 1

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

2 answers: sort voted first

I would go about this way outside of the Level BP and just create a Blueprint I could drag and drop into any level for any actor.

  • Create a new Actor BP (I called mine FallingObjects)

  • Add a Box Collision and Size it to your liking.

  • Uncheck "Hidden in Game" for debug.

alt text

  • Add a variable called "Hanging_Object" type Actor

  • Make it visible to public

alt text

  • Then I would go to the Box Collision and create code for the "On Component Begin Overlap"

  • My Trigger only happens when my Player Character overlaps

  • Then it gets the hanging object and turns on the Simulate Physics

alt text

  • Make sure the object has Simulate turned off and move it where ever you want in the level.

  • Add the object to the BP

alt text

You can then take this and expand on it however you want like making an array of objects and turn them all on at once :)

Hope this helps!

hanging-object.png (757.5 kB)
onoverlap.png (81.6 kB)
cube.png (423.0 kB)
more ▼

answered Feb 01 '19 at 06:27 PM

avatar image

116 4 5 7

avatar image HauntedPringle Feb 01 '19 at 07:15 PM

decent, i wasn't sure how to go about moving the box and the tigger individually within the level

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

you can do it all in the level blueprint.

add a cube to your level and call it 'falling cube'

create a new blueprint in the content browser and call it 'collider' Add a box collision component and a cube to the blueprint (the cube is to see where it is) then scale the cube so it's smaller than the box collision volume, and set the collision on the cube to ignore all. add one to the level

go back to the level editor and open up the level blueprint from the blueprints button above the editor (make sure the window isn't fullscreen) then drag the 'falling cube' and the 'collider' from the world outliner on the right.

then basically create this graph

alt text

capture.png (164.8 kB)
more ▼

answered Feb 01 '19 at 02:23 AM

avatar image

8 1 5

avatar image HauntedPringle Feb 01 '19 at 02:25 AM

it binds a custom event to the 'on component begin overlap' event of the box collision and then sets simulate physics to true on the cube.

avatar image Labrador23 Feb 01 '19 at 06:11 AM

i cant connect the collider and the bind event and also how can i get the Event_0?

avatar image HauntedPringle Feb 01 '19 at 07:12 PM

it's a custom event so you type custom event and cal it what you want

(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