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"

Alternative to "Move Component to" which takes collisions in to account.

Hi folks,

I'm hoping someone can help me. I currently have a destructible mesh blueprint which is set up to move to a random location using the "Move component to" node. The movement looks perfect and is working exactly how I want, however much to my dismay I have discovered that the "Move component to" node doesn't take in to account collisions, so the mesh can freely go through walls.

What is the best alternative to "Move Component to" which will take collisions in to account? Currently the only component in the blueprint is the destructible mesh. I did try adding a box collider to the blueprint and trying the "On component overlap" event to the stop pin of the "Move Component to" not but that didn't work.

Many thanks

Jason

Product Version: UE 4.12
Tags:
more ▼

asked Jul 14 '16 at 08:50 PM in Blueprint Scripting

avatar image

jaytmek
3 1 2 3

avatar image Coyote King Sep 25 '16 at 05:17 PM

Could someone please demonstrate what these blueprints would look like? I'm having a significant amount of trouble getting my side scroller character to stop dashing through obstacles..

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

2 answers: sort voted first

You could try tracing from the current location to the random location, and then checking if there was a hit. If yes, move to the hit location. If not, simply move to the random location.

Be sure to store the random location to a variable, so that you don't generate an other one if the trace doesn't hit.

more ▼

answered Jul 14 '16 at 10:31 PM

avatar image

AdamBors
111 2 4 9

avatar image jaytmek Jul 16 '16 at 07:19 PM

Thanks very much! Used a sphere trace and set to the radius to the object's Z bound. Its not perfect but it will do for now!

avatar image Mhmd Mshymsh Apr 09 '19 at 11:53 AM

How can we do that ?? I'm facing the same problem. Can anyone help me please I'm really new with unreal engine

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

Calling SetWorldLocation() on the root component allows you to specify a "sweep" which will stop when it's blocked and return you a list of hit results.

more ▼

answered Apr 08 '17 at 11:23 AM

avatar image

Daganar
1 1

(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