Collision Box Appear to not always trigger

Hello Everyone,

I’m currently working on a personal project where I have to do treadmills.
There are many where these follow splines without physics.
In my case, I need to physically simulate the objects so that it looks like a real treadmill.

How do my treadmills work:
OnComponentBeginOverlap(BoxCollision): it detects the object crossing the carpet and sends the information to an actor “X” located in the level.
EventTick: It checks that the object currently in Overlap corresponds to the object saved in actor “X”. If so, it will do an AddActorWorldOffset.

My problem is that after a certain moment, the object traveling on the conveyor belts will not be detected and therefore will no longer move.

Does anyone have an idea/solution to resolve/workaround this problem please?

In the photo the ball should be moving to the left but instead it stays still after the corner conveyor.

PS: I already tried with putting the overlap system directly in the little object (even if it’s the worst choice for me) but the result is the same.

PS2: CCD and Multi Body Overlap are ON in the Box collision

Hello,

The best thing to do is to figure out WHEN this happens. You should place print strings that notify you of every successful overlap. So, tag on the print string to whatever overlap event(s) you have. When it doesn’t fire, take a closer look as to why. You may have volumes that are overlapping. Unsure though without more information.

I tried with print strings, but I forgot to look at the logs for the history, sorry.

Now, I know that this “accident” occurs when the object moves backwards during the transition from one conveyor to another and therefore activates the trigger box of the previous conveyor, changing the value of the actor “X”.
The problem is that this makes the verification system obsolete.

If we take the example with a first conveyor “A” and the next which is “B”.

When the object triggers the overlap of conveyor “A”, as a result, actor “X” registers conveyor “A” for the object, the verification system validates the comparison.
Result: The object moves forward.
When the object triggers the overlap of conveyor “B”, as a result, actor “X” registers conveyor “B” for the object, the verification system validates the comparison.
Result 1: In the case of the “accident”: The object moves forward but produces a slight backward impulse which triggers the overlap of conveyor “A” after it has occurred. The verification system does not validate the comparison.
Result 2: The object ends up on conveyor “B” but no longer moves.

The current problem is to resolve this situation where the object can trigger the previous conveyor “A” while it is already overlapping the conveyor “B”.

This verification system was put in place in order not to add the two forward vectors during the transition from one conveyor to another.
Because otherwise, this addition doubles the speed of the objects during the transition.

:face_with_spiral_eyes:

Either this is simple and you’re making it complicated or it is complicated and I genuinely am having difficulty understanding EXACTLY what you are saying.

PLEASE POST A VIDEO (or link to video) with the print strings so I can see what is going on.

Sorry for that.

Here is the video: https://youtu.be/J3ZDwz5ZV58

I hope it is what you wanted ^^’

Please share the blueprint if you can.

Okay, this makes life MUCH easier. I can see that there is a conflict (in the video) with conveyors 10 and 20.

Will the conveyor only move forward?

I do it for non commercial purpose, so yes i can.

BP of normal conveyor (Same system as the corner conveyor)
Event Graph:


SetOverlappingActor_GameInstance macro

Push system:

BP_Item Generic
Event Graph:

1 Like

Yes, the conveyor push only in one direction: forward.

Okay, there are two ways you can go about this (that I can think of right now):

The first is to SPACE/SPREAD OUT the overlaps. Don’t have them so close.

The second is to test if the object is already in the next conveyor:

So, the object HAS to be in 10 for 20 to work. Then when it has finished doing work in 20, 10 is reset. And so on.

But again, the easier option would be to space the volumes out (or to be more clear, make them SMALLER.)

I did a new test where I put more space between them but the problem is still there.

For the second test, i’m going to do work on it and will share the result after.

I can’t immediately see what is the issue. However I’ve foind overlaps to be a bit unreliable for this, specially when handling the transition from one overlap to another. So what I can do is share what has worked for me in hopes that a different solution might help with your current.

  1. Create a base class for the conveyors with:
  • Spline component.
  • A reference to the next conveyors it would “pass” the actors to.
  • Float that will represent speed that this conveyor moves the “cargo”.
  1. Make child bp of the conveyor base and modify the spline. I made two to test (straight and left turn) and placed them like so:

  2. Create an actor component with two variables:

  • Current conveyor.
  • Float variable for distance along spline.
  1. Create a manger class with a refrence array of the component in each of the actors that are to be moved in the conveyor. Create a function like this that runs on tick:

Result:
conveyer

For reference this is how I spawn the boxes for debug in the manager:

You could have the conveyor actors handle the movement, but I’ve found it easier to debug, profile and a bit more performant if everything is in one place.


Hope it helps.

I’m back!

I didn’t achieve to make the second test because it was way too complex for what it need to be.
And then, i got genius clearance.

So I erased the verification system in the conveyor, add an overlap count on the object and then I divides the Forward Vector by the number of overlap that in the MOVE function of the conveyor.

No problem anymore, and everything is smooth.

I hope you understand what i mean.

HA!

Congrats!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.