How to check object position on spline an fire event

Hello everyone, I’m new to unreal Blueprints, and I’m stuck with a problem:
How can I check if the object cube in the spline reaches different positions?, every time the object reaches one of the positions, an event is fired which changes the material into a certain sequence

after your set world transform node just a add in a branch then off the true pin call your color change event. for the branch’s input bool plug in a “OR” node, then for each input of the OR have a vector == vector. the vectors will be be the cubes location and the location at distance along spline where you want the event to be triggered.

Hi ThomsonN13 and thanks for the quick response, I hope I’m in the right direction, I’m assuming that my cube moves only in one position through the spline, what am I doing wrong?

The problem is with the condition.
What I’d do is put the spline points in an array and compare the spline point’s position to the character’s position and if they are the same set the condition to true.And if you actually want the position to be between 2 spline points, you can get the closest distance using abit of math

Second: The spline is in the cube and I’m not sure what it is you want to do
Do you want the cube to follow the spline?
Are you moving the spline within the cube?..If so, wouldn’t it be better to use local transform?

I’m sorry
Basics of Blueprint

my intent was more akin to the following picture. using a or may not be the best method (it may need some tweaking due to performance differences in pcs) so instead here i just used two branches. the problem i see with your setup is that your not really comparing any vectors (they arent connected to anything).

1 Like

thanks ThomsonN13 works!!, #originaltenka I wanted to do the following: At the main level the Cube and splaine will be placed every time I click a button… the cube moves through the spline as soon as you touch it, then after a certain distance the Cube changes the color one of its sides, another stuck other side and so on…, and when the cube arrives at the end of the spline is deleted.

I see…glad you managed to do it