Hey guys, I’m looking for a way to make my object move in a spiral, but so far I haven’t found anything, could someone help me?
this is the spiral, but I need the box to follow the spiral and go up
Have a look at Geometry Scripting. Append Spiral Revolve Polygon - Revolves a 2D polygon on a helical path, like one used to create a vertical spiral sounds like a starting point. Haven’t played with it myself yet, so can’t provide code examples, but hope this gets you on the path.
Hey @AndreeMichels
You could try :
- A Spline
- A combination of RotatingMovement and Z movement
- Small trigger boxes on your spirale which add a force to the box to push it upwards
I have a bp code that makes the box move along the spline, but the spiral that I do manually is not perfect, I need something like this, but this video was made in c++, I need it in bp.
You’ll have to calculate points of a circle for each full turn of your spirale. The number of points depends on your desired segmentation, like 20points per turn, 5 turns, you need 96 points because the last point of one turn is the first point of the next turn. Each coordinate must be calculated by
X=r * cos (phi)
Y=r* sin (phi)
where phi=360/20 and then you would have to add z where z depends on the height of one turn. So Z=Number of current point * height / 20 + height * number of current turn
Then add these points to the spline.
my god, thanks for the explanation but for me you are speaking in greek hahaha
I’m trying to do this with a blueprint that spawns meshes along the spline, but I’m finding that as soon as the construct script runs, the spline is reset to 2 points.