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"

MoveComponentTo does not fire collision events

I am playing arround with a dungeon crawel like game where I want to move the player like a pan on a chess game by an exact number of units in a raster.

Therefore I use the "MoveComponentTo" method in my blueprints to move my character. I did not find out, why no collision/overlapping events are fired during the move of the character.

alt text

Product Version: UE 4.10
Tags:
blueprint.png (194.2 kB)
more ▼

asked Jan 18 '16 at 01:29 AM in Blueprint Scripting

avatar image

weberl
237 17 20 33

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

2 answers: sort voted first

Using a timeline and lerping into position solved the problem for me.. I will post the solution soon. Thank you for your help!

more ▼

answered Jan 19 '16 at 10:41 PM

avatar image

weberl
237 17 20 33

avatar image weberl Jan 22 '16 at 08:57 PM

Another hint for anyone who wants to achieve exact control of the movement of something via a timeline:

Make sure that you checked the "Use Last Keyframe?" checkbox. Otherwise you will see odd results. I lost some hours of livetime on this.

alt text

timeline.png (33.1 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Do you have the 'generate overlap events' and 'generate hit events' toggled on in the component properties?

more ▼

answered Jan 18 '16 at 01:33 AM

avatar image

TTaM
1.7k 81 28 81

avatar image weberl Jan 18 '16 at 01:40 AM

You mean in the character component or the walls?

avatar image TTaM Jan 18 '16 at 01:44 AM

In whichever object you want to generate collision events.

avatar image weberl Jan 18 '16 at 01:50 AM

It's activated.You can see my character capsule settings in this screenshot.

alt text

answer1.png (108.5 kB)
avatar image TTaM Jan 18 '16 at 01:53 AM

And the capsule component's overlap event in your character's blueprint aren't firing?

avatar image weberl Jan 18 '16 at 01:59 AM

Exactly. If i push the player by force, then everything is ok and the player is blocked by the walls. Therefore I know that it's a matter of the 'moveComponentTo' But this method is not good for me because I need to move the player exactly 200 units into any direction.

Do you have any Idea how I can make sure the player does not leave the grid?

avatar image TTaM Jan 18 '16 at 02:16 AM

I'd suggest using a timeline. On the update, move the character in the appropriate direction with a regular SetActorLocation (or component, whatever) with sweep enabled. Check if there's a blocking hit and stop the timer if there is.

(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