1
\$\begingroup\$

I want to create a game where you walk around in 3D, and sometimes you can activate some kind of 2D puzzle. For example - you walk up to the door, and you can open it using lockpicks. The lockpick part is 2D. There's plenty of games which could be example of that, like Assassin's Creed 3, Skyrim or possibly the new Thief?

While lockpicking the door, you lose control of the character, you use mouse or buttons to move the lockpicks. The visible elements would be moving.

How would you do that? Should I use UMG objects like images and buttons, or should I use some other kind of 2D graphics drawing? Or something even else?

\$\endgroup\$
1
\$\begingroup\$

I think I solved my own problem quite well... this is how I did it.

I used default UE4 third person character for walking around. When I'm inside specific colliders and press a button, I access the "lockpick mode". That involves unpossessing the default character, creating a very simple pawn (it only reacts to some buttons and mouse movements, but cannot move around) and possessing it.

The lockpick "target" has a transform where to create the lockpicking interface, and where to place the new player pawn.

The lockpicking puzzle is not UMG. While UMG is powerful, it's just not enough. I have a game object containing the lockpick (which is just a 2D actor that has a collider and is controlled by the mouse) and some pins which have physics turned on.

If anyone is interested and this is not clear enough, I will be happy to add details!

\$\endgroup\$
0
\$\begingroup\$

I would use UMG. All the functionality you need is in there and you can use Set Input Mode Game and UI blueprint and set the target to your new UMG. It also has a Boolean operator to Lock Mouse to Viewport.

I believe this will also deactivate player control in the background but haven't tested this so can't say for certain. Disabling character control is also one function in Blueprint though so setting and unsetting it (when the UMG is closed) won't be a problem.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.