I am relatively new to the Unreal engine but have experience in making games in Unity. Basically, I want to make a first-person item-pickup system.
In Unity, I would raycast a sphere (sphere trace in Unreal engine) check for collided objects, and check if any object had an interactable interface. Then spawn the object as a child of a gameobject that is inside the camera (i.e. camera is the parent of the gameobject).
In Unreal Engine, I did all of the above but when the child is spawned it doesn’t stay at the location assigned to it relative to the camera.
What is currently happening:
Blueprints:
BPI_GroundInteractable:
Interface used for objects that are pickable
BP_MasterGroundInteractable
Base blueprint for interactable items, currently contains a sphere for testing and is the only pickable item
BP_FirstPersonCharacter
First-person character provided in the template, I have removed the first-person arms. Add sprint and head bob which are working correctly.
Interact method:
I found out that you can use sockets, but since I am NOT using a mesh I don’t think I can use sockets. In some tutorials, the tutor was using a static mesh with no ‘mesh’ assigned as the child of the first-person camera. And then he would replace the static mesh ‘mesh’ with the mesh of the picked-up item. This is not an option for me because I want the player to be able to pick up guns, torches rocks, etc.