Download

Pick-Up Amnesia Style?

Hey there! I’m not sure if this is a beginner’s question again or just really hard to accomplish, but here’s my question:
Is there a way to get your first-person view character to pick up an item so that it floats in front of the camera? The best example for that that comes to my
mind would be amnesia’s system of picking up items that you use in the game world, like boxes or something else along those lines.
Like this: (at 0:40 seconds, for example)
https://youtube.com/watch?v=0IF68RF8MXA
Cheers!

There is something similar in the content examples -> physics level. You can pick up blocks and move them around and throw them. I think its the Physics Handle (Physics Gun) section in the PlayerCharacter blueprint. Not positive though but you should be able to get a start from figuring out that example level.

Yeah, it definitely helps. Didn’t think of the content examples. Thanks!

I’m trying to create a similar set up so I’d be interested to know how you get on. The physics content examples work as above however there’s no kind of proximity trigger - so you can pick items up from across a room and they zoom towards you.

This might be a daft beginner question, but in terms of trying to learn Blueprints and visual scripting, do the nodes and their functions work in a similar way to Kismet, albeit with the added functionality of Blueprints? Would going through old Kismet tutorials be applicable to Blueprint in any way?

I’m not sure if this might work, but I’m going to try to enable input only when the player controller is in the item’s trigger zone. Might work, but I think there would definitely be another way to go about that.

This should absolutely work. In the blueprint just add a shape that can act as a volume trigger and add the start and end collision event for that shape. At the start event enable the input and disable it once you leave the trigger area. Similar to how they do in this blueprints tutorial

I’m still trying to figure out the functionality of picking stuff up though. The physics content example has exactly what I need, but I dont want to copy it not knowing what does what. Physics are hard. So if anyone can explain to me what the nodes do, please explain. I know it’s quite a lot to ask, but it seems to be very important to any physics based blueprint.

Volumes on each object seemed like you’d take a performance hit so I’ve just got home, started picking apart the content demo and found a few things.

The Blueprint “PlayerCharacter” has a variable called “Handle Distance” in the My Blueprint tab. Changing this variable changes the distance in which you’re able to interact with an object.
Also, static mesh actors only seem to need the tag
“Pickup”** added to have the interactive functionality. So no need for volumes(?).

The filters are proving very useful too. In the Content Browser, filter by “In Use by Level”. And in Blueprints you can then find references for most things and also search directly and will take you straight to what you’re looking for.

I agree with Exodune that I’d prefer to understand the process but hopefully it’ll help in the meantime.

Edit: Confirmed, no need for volumes. Just simulate physics and add Pickup tag to any static mesh - I’ve just been throwing fire pits around. PIC

Sounds interesting. I also noticed the handle distance variable, but considering you can just pick objects up from wherever, I thought the variable might be used by something else. Guess that question’s answered now, thanks! Same with the Pickup tag.
I understand most of the blueprint already, but the thing with it floating a certain distance from the camera is still beyond me, I just can’t manage to find where that happens.
So again, if anyone has the answer to that, feel free to explain to us how that works! Cheers!

I couldn’t tell you the workings of it, but you need to adjust these:

Edit: That seemed to bring up some issues when turning on the spot though.

That description was perfect. Couldn’t play around with it yesterday, but got it working perfectly tonight. Thanks for clearing it up so well.

Something I wanted to point out if you both haven’t seen it yet (I’ll be messing with this more tonight), I noticed that after you pick up something and put it down, it then loses it’s collision with the player. Throw an item then step over it and you’ll go straight through it. Odd right?

Yeah, you’ll have to re-enable the collision between it and the player when you let it go.

I had entirely overlooked that step. Good find! Got it now. Thanks!

No worries!

Using the Content example/ Physics is the place to start. You need the PlayerCharacter bluescript to be called. Set your objects to movable with physics on, and the objects to be manipulated as Pickup. I haven’t tried this for opening doors yet.

I had this system working already in UDK (pre-UE4). To make it more Amnesia style the PlayerCharacter needs to be adjusted so that you “grab” the object by clicking down left mouse, and when you release, it “drops” the object. The current setup has a click down to grab, and click to release which makes it more awkward and I anticipate more difficult for opening doors. Amnesia door opening is done really well and takes some tweaking of the door physics to make them smooth.