hi guys, i have a problem with sockets. i want to add a socket to ue4’s roller ball. its fine till here. the problem is that i dont want the socket roll with the ball. so the first question :: is there any way to prevent socket from rotating with its parent?
i want it to be constant. i searched about this and i found that i can ignore the rotation by using , bAbsoluteRotation = true , which spring arm itself uses this code to prevent itself from rolling with the ball.
i test that code by adding static mesh comp to roller ball and here is the code which didnt work !
here is RollerBall.h
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Ball, meta = (AllowPrivateAccess ="true"))
class UStaticMeshComponent* SocketHelper;
here is the cpp file
SocketHelper = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("SocketHelper"));
SocketHelper->SetCollisionEnabled(ECollisionEnabled::NoCollision);
SocketHelper->bAbsoluteRotation = true;
SocketHelper->SetupAttachment(RootComponent);
i set a mesh to test if it works and the result was not good. the mesh was rolling with the ball.
thanks for reading!