Download

Resizing/Relocating Obeject in Game

Hey,

I´m trying to get Blocks (walls) that can be resized and repositioned ingame. To do this i create a blueprint and in the blueprint editor I add 4 cube to the blueprint. This allows me to access position in size in the “event graph”. Now on button press ingame action should take place, but is not happening.
There is nothing more to it than Button->resize.
How can i realize this? Does it depend on the Blueprintclass?

Rumbleball,

I don’t your your level of experience so forgive if I touch on something that seems obvious.

Assuming you have some basic knowledge, check your collision. If you have it set to something like Pawn it won’t detect you clicks. Change it to custom and select whatever options you want but make sure you have Visibility set to Block.

If you are a bit newer, make sure your input is setup, to include ensuring that you have the right GameMode and that the proper player controller, default pawn and everything else is set up in it. After that check to ensure your input is working by adding in a “printString” node so you are sure.

Second, I can’t see how your blueprint is setup so let me know if this is right. You have a box in a BP with an Onclick event set to the cube. Once clicked it should resize to a desired amount, make sure any variables aren’t at the default 0. If correct, you should just be able to access the set world scale or relative scale node and change it to the desired vector size on the click.

However, when I upgraded to…, I think 4.6, the onclick events stopped working for me and I had to reinstall it. That solved the issue.

-James

You are probably using a variable to control the resize amount; make sure it isn’t set to the default of 0.

Hey, thanks for your reply.

Im new to Unreal Engine. Doing a project for university. Im using the default Ego-Shooter setup. What i want is an blueprint that is not the player, but reacts to keyboard input.

Your tip with doing a print helped me out. The class was not recognizing keyboard input. After following: https://answers.unrealengine.com/questions/19063/input-keypress-does-not-work.html
i made it work. Thank very much.