Download

Rotating objects in characters hand, first person.

Hi everyone, I want to implement an item inspection system in my first person game, but I don’t like the hovering mesh solution similar to Skyrim’s inventory item inspection, where the object being inspected is floating in the air, and can be spun around freely.

I want the player character’s hand to pick the object up via animation, and then have the player look around the object whilst the character is holding it. There is a similar system used in LA Noire when inspecting clues, and also in Telltale’s The Walking Dead, where the player has to inspect a radio to see why it isn’t working.

My own thoughts on this are to animate a short sequence, almost like a cut scene, where the player character grabs the object after a click. The animation would end with the object being brought into centre view. At this point the player is able to use the mouse or thumb stick to rotate the hand around to look around the object. I thought that could be achieved with blendspaces, with an animation for 6 to 8 rotations of the hand in all directions, and when the player moves between directions it should make for a fluid movement. Character movement would be locked until they put the object back, which would be a reverse of the pick up animation.

I just wanted people with way more experience than I to scan through my plan to implement this, and to see if it is viable, and also how they would go about it. I’m relatively new to blueprints so my knowledge of the different nodes is still pretty basic.

I would seriously appreciate any help or advice given,

Thanks!

That’s a really cool idea. I am confused, however, as to why you would need to make blendspaces at all. There are some actor rotation blueprint nodes (think they are SetActorRotation, and SetRotation for components…) that I THINK would work perfectly in this case. Its my understanding that using animations and blendspaces are for more complex animations like moving specific bones, arms, legs, and creating entire movement sequences. If you are only rotating the object, I think you can get away with just using blueprint nodes. Likewise with bringing the clicked object into view–there is a SetActorLocation node that would work as a quick fix–just set the objects location to a distance in front of the player character. For a smoother, albeit more complicated motion, you can look at this post: Moving actor from one point to another smoothly - UE4 AnswerHub

Hope that helps and makes sense!

Awesome, yeah that’s why I thought of asking here first, my knowledge of blueprint nodes are very limited. Thanks for bringing up rotation nodes, I’ll be sure to learn about them. The link you provided is also really helpful, I’m probably going to use that too. Great response, thank you so much samnater :slight_smile:

Hmm, actually after digging into this, I think animation will be a big part of this. I need the wrist bone to rotate the hand holding the object. I thought it best to create animations of the wrist bending north, south, east, west, as well as NE, SE, SW, and NW, so 8 directions in total, and use blendspaces to blend between these positions as the player moves their mouse/thumbstick in those directions. So yeah it’s kind of more than a flat rotation of an object, and more of a careful examination of it instead.