Hi,
I’m working on a VR game and I’m trying to attach actors to a main actor and force them to align in a circle around the main actor’s center.
For that, I’m using three BP, the main actor is the Carrousel, a second one is a spline the third one is the class of the actors that will go onto that circle.
The idea is that the user can grab the actors and swipe the entire circle around him hence the spline so that the grabbed actor can only move around that spline.
I’ve managed to make the spline as a circle around the Carrousel actor and also to put the grabbable actors on that circle.
Now, my first attempts seemed to work but was not working perfectly. I was using the vector of the subtracted original grabbable object position and its new one with the Find closest point on spline.
It’s working fine for object in front of the user but not on those behind which by thinking about it is normal, if the user goes to the left, the object in front follow and go left but those behind go left too instead of right.
So to solve this, I’m trying to make the main carousel rotate around its axis so that all objects on the circle will be affected (except the grab one that is ignored).
For that, I’m attaching the objects to the main carrousel with the node Attach Actor to Actor and this is where I have a problem.
No matter what I try or at what moment I put this node, I can’t manage to not have it affect the grabbable actors position :
In the keep location relative, they go like this instead of being in the circle like before :
There are in circle but not around the main carrousel object (the gizmos on screen)
If I put the Attach actor in Keep World mode, it puts the actors into “two positions” in front and behind the carrousel actor like this :
What I want is for them to stay like this :
I’m setting their position with the set actor transform to get them along the circle with this simple function :
I tried to change it by Set Relative Transform but it gives even weirder results.
Thanks in advance