I have a character in which I would like to be able to pick items at two different heights. I also would like the character to rotate towards that item when he/she starts the animation.
Thanks for the help
I have a character in which I would like to be able to pick items at two different heights. I also would like the character to rotate towards that item when he/she starts the animation.
Thanks for the help
Could you please add more details like how would the characters pickup items and what would cause the height difference (shelves, floating objects…). For rotation you can do this:
Use function Find Look at Rotation
In the function set Start as the character location and Target as the location of the item.
Then use the output rotation and apply it to the actor using Set Actor Rotation
The items would be at two different heights floor and around waist level. I would like the character to be able to walk close to the item an a interact button pops up. The player presses the button and an animation is played (showing the character picking up the item) and then returning to idle state. I guess the main questions are how to rotate towards the item which you answered. And finally how to create an event where the item tells the character “hey I’m an item” therefore pick me up using your pick animation.
You can either use trigger boxes (If it’s in a blueprint use a box component and then add event Overlap for the boxes). Or you can use the mouse and trace a ray into the scene (using single line trace by channel - YouTube) and see which objects it collides with