For anyone watching this video and running into the bug where the collision of the object you picked up is interfering with your character movement, simply go into the Inspected item parent BP -> static mesh -> collision -> custom collision -> check ignore pawn, but block everything else. You're welcome
If by 'interfering' you mean, 'bouncing up into the sky', then I'm having this issue, but these things didn't work unfortunately. Back to watch it all again...
I spent hours on unsuccessful methods of picking things up. When it finally worked with your code I was actually jumping up and down with joy. Thank you so much!
That's because its overlapping to you which im also having that issue plus I cant get to simulate physics without it not getting picked up honestly this tutorial wasnt that good because of that
Thank you so much! Had some problems at the beginning but figured everything out. I added keys to my game that the character can pick up and I made the keys spin but when id pick them up it would spin my whole character so had to remove that feature😂
Hey, this is not working for me in UE5, any idea why that could be? I did the coding exactly the same but nothing happens when i approach an object in my scene and try to interact with it.
same - when I re-activate "Draw Debug Type" to "For Duration" I can see the Line trace firing on a flat plane, not adjusting with the angle of the head and camera
I'm on Unreal Engine 5 and it is not working at all, When I grab the object my character doesn't respond anymore or he is ejected from the map xD. I watched again and again the video but nothing is changing, did other people had the same issue and did you solve it ? Ok I found on the comment the issue was in the blueprint InspectableItemParent, going to Collision and then Collision Presets "OverlapOnlyPawn". and then everything worked perfectly ! Thanks for the tutorial !
Currently having trouble in the putting it down part, it seems that its not resetting the inspecting variable(its always true), therefore not allowing me to put it back down, any idea what it could be?
Nevermind. Found the solution. Im using a third person camera, so when you click the interact button once u have the objective picked up, you need to make sure the line hits the object you are currently holding, otherwise it wont play the "putting down" because it only interacts with objects with the interact tag.
@@darkmazztv If I remember correctly, my line trace was on the wrong axis. After fixing that, the issue was that the range was too short. You can enable debug on line traces from mouse clicks and adjust from that.
This might be a stupid question, but could you care to explain why do you duplicate the item you want to inspect using the actor component instead of inspecting the "real" actor? Duplicating it seems to be more expensive, isn't it?
Just finished the tutorial and was scratching my head. What if my item has its own variables, copy all those too? Thanks for also asking the question, helped me realize that there's a better way. I'll be looking to transform the original item to the pick-up point instead of duplicating/destroying.
Everything works as expected UNLESS I am holding the mesh and my character hits another object in the game, then I can't put the grabbable object back down. Any ideas on how to make the code ignore collisions with my character while I am holding the object?
hi matt i have a problem. When I pick up the object from the ground, the object on the ground does not disappear and does not descend again until I click on the object on the ground again. How can I solve this, what minutes should I look at.
Hey mate, I love this series. I had a question, when I pickup the object and try to move, it yanks me out of map. Why would this happen? Again, thanks! Edit: Issue was Collision, the itemparent and my map collision was colliding so moving it a bit further and higher in camera helped. Cheers
Nice!!! I was studying your videos right now, could you make one about the timeline node, I was watching the lerp one yesterday and the timeline node still confused me.
@@pufisd Value Change Overtime... like you can do float nr 1-10 within 5 seconds and you can even smooth it out with curves so at 0sec it slowly goes to nr 1... and from nr 9 it goes slowly to nr 10. You can do even wobbly stuff. For example door, opens fast for a second, but then sloooowly opens up. The issue on Timelines I think is overwriting it? I don't know, haven't tried it much like, pressing E to Open door and you kind of have to wait to end, but what if I want to close it while it's opening. Haven't noticed any tutorials about that and that on top might create a bug where you get stuck between doorframe and door :)
@@ciarangaming7563you have to disable collisions on the object you pick up, or set "pawn" to overlap. The problem is the object collision is fighting with your character capsule and trying push them apart.
Another thing: I have a piece of paper with text as an object. I unfolded it and put it on the surface as it should be. If I pick it up from the surface above ground level, it is if I put it down normally without changing its location, but if I move away from the surface with it and try to let go of the object it first descends tangentially and in the end sharply descends vertically to the ground and .... flips 180 degrees. What do I add and where to make it at the end of the landing does not make a turn on 180?
Firstly thank you for the tutorials and I’ve tried some of your other tutorials, most of them work so far. For this mechanic I can pick up the item and inspect but I can’t put it back down. When I press E again the character can move again but the item is still floating in the middle of the screen. I’ve checked the code multiple times and nothing seems amiss.
I am having the same issues I'm not sure if its a UE5 issue, there was a comment at the bottom for a fix but with no luck. I can pick it up but it stays in the middle of the screen and I can't put it down again?
I found a solution that worked for me, Right after the first LINETRACE there is 2 branches with the second branch having the "actor has tag" in the return value. In the Actor has tag return value add in a "OR BOOLEAN" and connect the Inspecting variable and the actor has tag to it then the pin going out of the OR BOOLEAN plug it into the 2nd branch, this was super confusing for me so I hope it makes sense but messing around with it I got it to work for me using this method. Hope that helps.
Hi Matt. Thanks so much for this tutorial. I have this issue though: the first time I place back the item it goes smoothly but afterwards it goes smoothly the first part and then snap back to the floor abruptly. Any idea why?
Hi. Thanx for the awesome tutorial. I have a little problem. I watched the video 5 times and i am sure i did everything right. I can pick up the object but i can not put down. Can you help me? (Update) I found the problem but i still don't know how to fix it. To interect with the object it needs to be in the center of the screen. But i don't want it to be center.
You have probably moved on from this long ago, but for future users with the same issue. You can resolve this by changing two branching statements to receive an OR condition. The first branch which requires this is the one immediately following the first "LineTraceByChannel", add the "inspecting?" boolean variable in, as well as an OR condition, and then plug the inspecting variable and the already existing return value from our LineTrace into the OR conditions which then can go back into the branch. Then repeat this process with the very next branching statement which currently only takes the "ActorHasTag" value as a condition. So as a quick breakdown for anyone who cares, the mechanic will now function if the item in front of them is an inspectable, OR if they are already holding an item.
I was able to follow along with Lewis’ OR condition suggestion. It did bring in the Access None error. To solve that I saw that adding “? Is Valid” and inputting it before the branch call and connecting the target for it to whatever the error is referencing. It screwed with the line traces ability to place the object back down without directly looking at the ground. Which is what I’m trying to solve next.
Can i ask you a thing? how can I stop players from dropping items on the opposite side of walls? Like, how can i set the collision off just for the pawn, just for my character while i hold a item? The item needs to block walls for example. I'm my code i just "Set Collision Enabled" and put "No collison" This makes the object go through everything and I want it to just go through my character so that the famous bug of climbing objects and starting to float doesn't happen. And i think that its a great video suggestion for the grab, inspect, drop items series :) Sorry to bother.
Thank you for the tutorial. I have created the blueprint, only have the problem that I can not pickup the sphere, instead plays the sequence of the "Open Drawer" the sphere then moves like a drawer and the sound to it, what did I forget to do ? I have the Open Drawer also rebuilt from your Tuts before
Hi!! If i have so many "interact" inputs on the same project, how do i to each input work in the current BP, one example i did the drawer blueprint, and when i press the button of open drawer next to interact item it make the drawer function. Did you got it?
Yep, I found that tags were a good choice for this system. And an interface would be better to use if I did the picking up code within the blueprint, or it needed to be different for each item. However, I did it all in the character BP without needing to cast to an external blueprint. So in this case, I didn't need an interface, I started out with one, but changed how I was writing the code half way through :)
Thanks for the video. It really helps. But i am with a problem, when i try to place it on the ground with the E key the objects starts to go for the ground and then dissapears, can someone help with this?
Is this method works?: So when u click an action key for example "E" key, an animation will be triggered and by anim notify when the animation hit specified frame, the object will be attached to character's hand socket. i wanna give it a shot but i dunno yet how to implement that, i just knowing that anim notify is used to make like triggering footstep sound. Also i dunno yet how to attach object to socket.
Look up any equip weapon tutorial. Attach to function actor to component or other, to certain bone/scene/item, if necessary add a socket to the skeletal mesh and there you can even use preview with certain weapon/actor.
Hey mate, theoretically that sounds correct yes. Once you add the notify to your animation, in the animation blueprint, you should be able to get the event for that notify, it should be named "Anim Notify 'whatever you named it'". Then you can use "Attach Actor To Component" to attach the object to the socket you like :)
Does this work after I added changing perspective from Third Person to First Person system? I did use only FPP camera while Change Perspectiv System still in place, it doesn't work.
Hi. Thanx for the awesome tutorial. I have a little problem. I watched the video 5 times and i am sure i did everything right, But i cant pick up the item:(
I fixed It somehow, i just readded the tag to the object and static mesh I was using I went to its file and checked if there were collisions + set the collision type to use complex as simple and it worked
I did exactly what this video said to do and I got an error trying to pick up the sphere, but in my game, the sphere is a gas can. I copied the interactable item, and the BP for the character for the item, and instead of picking up the item, I get no response when I click E. Can any of you help? I made a video of my BP set up in case you need to see my BluePrints
For anyone who is going insane about it glitching through the floor when you look down and drop it, I was able to fix it by going to the final line trace he showcased in the video and adding a few things. I'm bad at explaining but here's an attempt. What you do is make a branch with the condition coming from the blocking hit on the break hit result for the linetrace by channel. Connect the white arrow to the branch from line trace by channel and connect the true output to the New item end location. For the false, connect the output to a new line trace by channel node. For your start, get the actor location for the placed item and do an add vector node. In the Z, put 500. Now for the end, it's the same as the line trace that he did in the video, or the location for placed item minus 500 in the z. Break your new hit result and set the location for that one to be your new end item location variable. Connect that to the new item start location which then goes to the timeline and it should be fixed
Hey I’m having a slight problem, every time I pick up the object it uses collision and if I aim the object on the ground I can jump on it, but if I disable collision I can’t pick it up, but still a really helpful tutorial
Hey mate, what you could possibly do is disable the collision after you have picked it up, and then when you place it back down again, re-enable the collision
I realize this is super late but, this is a feature for the script as it was written and not a bug. You can fix this however by setting the first two branches after the first LineTrace to accepting an OR condition, with the other condition being "inspectable?". So if inspectable is true(player is holding) then it won't require the linetrace hit.
@@lewiswarren4163 nevermind, I figured it out. I wasn't using a variable called "inspectable?", and just realized Matt was. I added the "or" boolean to the branch after the "has tag", and it works now. thanks.
Hey Matt thank you for the awesome tutorial i faced some issued and fixed but still need to ask some. First of i wasnt able to pick up the item so i searched a little and noticed i started my project raytrace disabled at first i tought thats the issue so i enabled it but then i figured it was cuz of the mesh collision it was no collision so i fixed it and now im able to pick them altough they throw me away when i look ground but thats okay the question is would this code still works if my project is created raytracing disabled ?
This didn't work whatsoever. Interferes with your collision presets and does'nt work at all if you have simulate physics enabled. Overall, not worth the headache, just use the physics handle component
Decent Code but it's more of a loop hole than any proper coding for picking up and dropping objects. You look straight down and boom off to space your player goes with the held object... haha