An object/player moves in a direction while it is inside a Box volume.
But when an object reaches the end of the conveyor belt (Out of the volume), it’s speed is not kept and immediately stops. I use “AddActorWorldOffset” to move.
My initial graph is for increasing velocity with each impulse so over time the actor would be traveling faster and faster.
This one would be for a constant velocity where as soon as the object hits the conveyor belt it will be traveling at the same speed as the belt and remain at the speed.
In this Graph the velocity is a constant and will be applied the moment the object hits the box. This will not accelerate over time like my previous graph.
The issue is that when the object leaves the box it does not have any inertia.
In the picture attached I have slightly modified the blueprint to look for overlapping components instead of actors and therefore we can add an impulse to the component. The Velocity variable is now not related to delta seconds.
Awesome! It’s working as expected. I didn’t know this node existed but it made it work. Thanks!
Only one thing, it doesn’t changes the rotation when it collides with the mesh under it and at the end (or too much because the gravity is removed) but i can find a way to fix that.
The only thing i can’t get around now is the player, it has a CharacterMovement component to move, so physics are not applied. But if i activate physics simulation, it disables controls. I’d like to be able to move on the conveyor belt.
When standing on the conveyor belt (Get Movement Base or Overlap), move the character for example with add velocity to movement component. No need to activate physics in the capsule or mesh.
Now the mesh animation needs to adjust accordingly. The animation blueprint needs to be told to stay in an idle animation. A bool in the Animation Blueprint or a custom movement mode could be good way.