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"

Begin Overlap does not work when we are moving

I am making .io game. I want to apply damage when overlapped, but It works when ONLY other component is stopping. Do you know about this trouble or solution? plz

Product Version: UE 4.21
Tags:
more ▼

asked Aug 12 '19 at 04:23 PM in Blueprint Scripting

avatar image

xEV39x
5 1 1 2

avatar image ClockworkOcean 6 days ago

Can you show some code? It should work with both objects moving...

avatar image xEV39x 6 days ago

thank you for reply! Both Actor are same blueprint https://gyazo.com/2ceeb763a085b57aeab04f6e4bfac03f https://gyazo.com/8bba6639f8332bae6965130b69368952

and I dont want to block each other, because one object will become very fast, but I want to apply same impact to other actor, so I used begin overlap. something problem with this setting?please teach me? and sry with my bad english.

avatar image ClockworkOcean 6 days ago

It's useful to see the collision settings, but I really need to see the BP code, can you show that?...

avatar image xEV39x 6 days ago

https://gyazo.com/10408302ab60542c05eceb473c1d3084

I added many times, so dirty

setV is a function only to make velocity.

avatar image ClockworkOcean 6 days ago

Right, nice lot of complicated code.. :)

To make sure they're overlapping, I'd drop all that code ( temporarily ) and only have the OnBeginOverlap and a print string.

I think you'll see they are overlapping, even when moving.

You probably have a mistake in your other code...

avatar image xEV39x 6 days ago

sry, this begin component may working...?

I added print String here https://gyazo.com/afbf9250f400f9308b23b19e3a484641 sry, this begin component may working...? but,

please watch this video print String from 00:23 https://www.dropbox.com/s/8auwl3x1aq7n16v/2019-08-13%2022-45-53.mp4?dl=0 this print pattern will become "<, >" or ">, <" or "=, =" however, this is "<, <" ?????????????why????????????

avatar image ClockworkOcean 6 days ago

Sorry buddy, you're just got too much going on there... So you're saying the overlap is working?

The answer to this kind of thing is always to chop out large areas of code to find out what is happening. Make it simple, get it working, add the next bit. Like that.

The game play looks nice :)

avatar image xEV39x 6 days ago

ok, Thank you.

avatar image ClockworkOcean 5 days ago

Do you have 'trace start' and 'trace end' the right way around? ( hard to tell... )

avatar image ClockworkOcean 5 days ago

I notice you're comparing the distance between the objects on impact ( A: input ), with how far one object has travelled in the last second ( B: compare with ). Presumably A is approx = 0, the other actor could have travelled far in 1 second, so this value will be < 0.

avatar image xEV39x 5 days ago

sry,I cant understand it, cause I'm stupid and crazy translator.so, what should I do? I think "traceEnd - traceStart" means actor velocity, Is it True? I think you got Truth, I want you to teach me please.

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

1 answer: sort voted first

You're doing good, but have made an asumption that's not true ( maybe ).

You say '< < why?'

You are comparing two things:

A) Speed of object in cm/s

B) Distance between objects

When objects collide, B = 0, so comparison will give < 0

more ▼

answered Aug 14 '19 at 09:12 AM

avatar image

ClockworkOcean
1k 6 4 6

avatar image xEV39x 5 days ago

I solved this problem! I don't know why I used "Trace Start" "Trace End". I used, Seld → Get Velocity instead of "Trace (ry" Thank You Very Much!

(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