Im a beginner and trying to make a puzzle game. in the game, you have to put a key (a simple physics object) in a box beside the door. I want it to be when you put the key in the box, the character will load to the next level. if anyone knows how to do that, please help…
You’ll need to show what you have so far, otherwise I don’t know where to start.
Do you have BP for dropping the key?
EDIT: So it’s a physics object ( I was that in email, but it never made it here ). How do you know when the player puts it in the box?
So, I basically set out a raycast to detect physics objects and picks them up. The key is just a physics object, it has no blueprint
Place a trigger volume inside the box, and On Begin Overlap check if the overlapping object is your key. Either make the trigger only overlap a certain collision type, or just add a specific actor tag to your key and make the trigger check if Other Actor => Has Tag [your tag name].
You got me all confused. You can’t cast to the key if it’s just a physics object with no blueprint. I’d personally do it this way: add an Actor Tag “Key” to your key. Place the Trigger in the box. In the Level Blueprint, create On Actor Begin Overlap (Make sure your trigger is selected in the level, then when you type in On Actor Begin Overlap and select it, it will be created for your trigger). And then just this:
(for the EDIT:) I dont know yet actually. That’s what i m trying to find out. Sorry, Im a complete beginner.
Maybe a trigger box could work, but idk
Ok, so on my trigger blueprint, drag off the exec to cast to (the key)? and connect the overlapped actor, to the object on the key?
My cast is set to pick up any physics objects that is encountered. Sorry I just started 2 days ago. here is the blueprint on my chartacter that enables me to pickup physics objects.
Oh, you mean “cast” as casting a line trace? That’s not what I thought =)
Anyway, your picking up setup seems just fine, but it has nothing to do with the box and the trigger.
Look up some tutorials on triggers, if something is confusing. The videos will explain it better.
Take a look at my screenshot above. That’s the setup how to make trigger work ONLY with a specific actor, in this case the actor that has a “Key” tag. Just make sure their collision presets don’t ignore each other; but by default they shouldn’t.
Yeah, i’ve searched up tutorials and still will, but do you know how to trigger it with an object instead of the charachter?
EDIT: but thanks though
Thankyou so much!!. This helped alot