VR Make Objects Resizable with Motion Controllers (Blueprints only) - Unreal Engine 4 Tutorial

  Рет қаралды 10,830

Marco Ghislanzoni

Marco Ghislanzoni

Күн бұрын

Shows step by step how to create actors which can be resized in Virtual Reality using Motion Controllers.
This method is entirely Blueprint based and does not require any plugin.
For maximum flexibility, it uses Blueprint Interfaces like the Pickup Actors in the original VR template. In fact the two interfaces can also be combined in a single actor making it grabbable and resizable.

Пікірлер: 64
@AICineVerseStudios
@AICineVerseStudios 7 жыл бұрын
These tutorials on VR, are by far the best I could find on youtube and by far the best use of physics in UE. Looking forward for anything you will be uploading, I'm sure it will be worth learning!
@marcoghislanzoni
@marcoghislanzoni 7 жыл бұрын
Hi, I just uploaded a new tutorial on how to make realistic physical objects. Check it out! kzbin.info/www/bejne/hWS3fmh5gZt4pdk
@pacificlinedesign19
@pacificlinedesign19 5 жыл бұрын
Thank you for making these.. Just got into VR and loving it.
@derocktyler9882
@derocktyler9882 5 жыл бұрын
Awesome tutorial. Learned alot. Thank you!
@kfogo7459
@kfogo7459 3 жыл бұрын
THANK YOU! this helped me tremendously!
@sachapierre8469
@sachapierre8469 2 ай бұрын
Hey ! Is there a way to do the same thing, but including trace lines to do it from afar ? As in, a line pointing from the hands to the object, to which the user would be able to scale ?
@marcoghislanzoni
@marcoghislanzoni 2 ай бұрын
Yes, that is also possible, in the end you need to identify two points on the mesh and use their distance as a multiplier to stretch the mesh along the axis connecting them.
@lakshmananmass1527
@lakshmananmass1527 2 жыл бұрын
why i have error when i compile StartResizeActor @12.11 and the error is " OnComponentHit (control mesh) does not have valid matching component" we can do this projects in 4.26? because motion controller grip 1 is not showing in (project_settings>input>Action mappings) in unreal 4.26
@marcoghislanzoni
@marcoghislanzoni 2 жыл бұрын
It could be that you called your component differently or changed name to it?
@pratikvyas7777
@pratikvyas7777 11 ай бұрын
in 5.3 there is no grab actor function name pls help
@mattiurrehman361
@mattiurrehman361 3 жыл бұрын
hi marco how do i scale it from a distance using line trace, i want to use both controllers but from a distance your help will be appreciated
@marcoghislanzoni
@marcoghislanzoni 3 жыл бұрын
It's not much different from what shown in the tutorial, except that you identify the actor to be scaled up from the hit of the line trace instead that from the overlap/attachment of the hands. Once the actor is identified, the process is the same.
@mattiurrehman361
@mattiurrehman361 3 жыл бұрын
@@marcoghislanzoni whenever i go near the object and go near it and press the relative key the cube vanishes away pushing all the other cubes away and i get this errorBlueprint Runtime Error: "Attempted to access ResizeActor_4 via property K2Node_DynamicCast_AsResize_Interface, but ResizeActor_4 is pending kill". Blueprint: BP_MotionController Function: End Resize Actor Graph: EndResizeActor Node: End Resize
@marcoghislanzoni
@marcoghislanzoni 3 жыл бұрын
@@mattiurrehman361 the error happens because the cube is expelled from the world and is therefore killed by the engine. I would need to see your code to understand why the cube flies off.
@mattiurrehman361
@mattiurrehman361 3 жыл бұрын
@@marcoghislanzoni how do i send it to you
@marcoghislanzoni
@marcoghislanzoni 3 жыл бұрын
@@mattiurrehman361 join Discord - Unreal Slackers. You can find me at vr_marco#8894. Once there DM me.
@eyamunaemy
@eyamunaemy 2 жыл бұрын
Hi Hello How can we acheive the same in Unreal 5 ? since there is no motion controller Bp, instead everything is inside the VRPawn itself.
@marcoghislanzoni
@marcoghislanzoni 2 жыл бұрын
You have no hands in the template but you have motion controllers. It works in the same way. Just detect their movements and use it for resizing.
@dibellagio85
@dibellagio85 5 жыл бұрын
Hello Marco, I hope you can answer, How can you asign a limit when rezise the scale of the cube? I dont want the cube being so huge or so smaller.
@marcoghislanzoni
@marcoghislanzoni 5 жыл бұрын
What you can do is limit the Scale within certain limit. You can add this node at 8:10 before feeding into the Set World Scale 3D node. This is what you need to use: docs.unrealengine.com/en-US/BlueprintAPI/Math/Vector/ClampVectorSize/index.html
@nlagas
@nlagas 5 жыл бұрын
Can you still pickup this cube? I suppose that you cannot. What would be required to make it scalable and"pickable"?
@marcoghislanzoni
@marcoghislanzoni 5 жыл бұрын
Nicolas Lagas the resize happens by design through a different Interface so in principle you could have a cube which can both be picked up and resized by combining the two sets of code. You could use one of the controller buttons to switch between pickup and resize.
@alpermaraz4079
@alpermaraz4079 5 жыл бұрын
Would it be possible to implement an if condition that says if i am grabbing the object with one Controller i can just move the object in the world like the standard cubes but if i grab it with both controller it does the resizing ?
@alpermaraz4079
@alpermaraz4079 5 жыл бұрын
or like an ingame button in wich i can switch between resizing and Picking up...would be awsome to have such a tutorial :)
@marcoghislanzoni
@marcoghislanzoni 5 жыл бұрын
Check out the logic in my Two Handed Weapons Tutorial. It shows how you can handle something with one hand and then with two hands. You can build a similar system for switching between grabbing and scaling.
@МаркПечугин
@МаркПечугин 6 жыл бұрын
If it help some one - if u add pointers(cylinder) to ur hand mesh and change first hand and other hand in start resize to pointer it will be much easier to scale objects in one move
@TheGamePixelz
@TheGamePixelz 6 жыл бұрын
Is there any way to change the scale of just 1 axis for things like making a rope longer but not thicker?
@marcoghislanzoni
@marcoghislanzoni 6 жыл бұрын
TheGamePixel yes, if you know which axis you want to scale, just set the scale of that axis and leave the other two unchanged.
@TheGamePixelz
@TheGamePixelz 6 жыл бұрын
Thank you for the quick response, but I'm still unsure of how to do that. When I look at "set world scale 3D" it requires a vector input. I can't manually type the scale I need in the Z axis because it is changing based on the distance the player is from the wall they are pointing at. When I multiply this distance by the initial scale to input into the "set world scale 3D" it applies the multiplication to all 3 axes. I feel like there's a simple way to just set the z axis to change to the float I have without changing the others. But I can't seem to find it, so sorry If this is a stupid question.
@marcoghislanzoni
@marcoghislanzoni 6 жыл бұрын
TheGamePixel to scale only one axis, say Z, you need first to Get World Scale for your actor, then break the vector, replace Z with the new Z while leaving X and Y unchanged, make the vector from the three and feed it into Set World Scale 3D.
@TheGamePixelz
@TheGamePixelz 6 жыл бұрын
That's exactly what I was looking for. Thank you so much. Your videos have been a huge help.
@IgraphyRupage
@IgraphyRupage 4 жыл бұрын
Than you for your tutorials. I followed this one and rechecked everything but this just won't work for me. I'm using ue 2.23. I have no errors or warning. But when I try to scale the cube nothing happens. It looks like "is resizing" flag won't switch but I don't understand why. Your help will be really appreciated. Thanks in advance
@marcoghislanzoni
@marcoghislanzoni 4 жыл бұрын
Make sure you have overlaps enabled on whatever you are trying to resize. Also make sure the mesh you are trying to resize has a collision volume (check in the mesh editor under collisions).
@IgraphyRupage
@IgraphyRupage 4 жыл бұрын
@@marcoghislanzoni Thanks for your reply! I don't have a powerful pc at home. Will check your suggestions next week at my college lab
@IgraphyRupage
@IgraphyRupage 4 жыл бұрын
I absolutely forgot to thank you with all this corona stuff:) It worked in the end. Thank you!
@marcoghislanzoni
@marcoghislanzoni 4 жыл бұрын
@@IgraphyRupage You are welcome. Stay safe!
@CanalDojogames
@CanalDojogames 6 жыл бұрын
I want to resize a map,is it possible? i mean it can be but how about elements that are on the scene like houses and all stuffs? do i need to make them CHILD on WORLD Outliner?
@marcoghislanzoni
@marcoghislanzoni 6 жыл бұрын
I suggest you watch a basic course on UE4. There are many on Epic's KZbin channel. Yes, you can resize the map by expanding the floor, moving and resizing the walls.
@CanalDojogames
@CanalDojogames 6 жыл бұрын
@@marcoghislanzoni I want to make it with the GRABB input from both motion controllers,i found a video helping but your tip go far better from it. i finally found how to make a fixed camera on a ue4 tutorial docs.unrealengine.com/en-US/Gameplay/HowTo/UsingCameras/Blueprints I will try to make it the Fixed camera and use the other one that i setuped early to a ''third person'' more near to character, them the player can change. The bad issue that i found was: character dont rotate itself so it will be a little weird or ''guided'' view but i can solve with 90 degree rotation button
@pierreaudouin6416
@pierreaudouin6416 6 жыл бұрын
Thank you for this very useful tutorial, what's the way to make a slowly resize?
@marcoghislanzoni
@marcoghislanzoni 6 жыл бұрын
You are welcome! What do you many by "slowly"? Resize less or make the resizing happen at a slower speed?
@pierreaudouin6416
@pierreaudouin6416 6 жыл бұрын
make a slower speed resize
@marcoghislanzoni
@marcoghislanzoni 6 жыл бұрын
The quantity which is defined at 7:49 is the new scale factor, which is then multiplied by the original scale and applied to the actor. If you want to make the re-scaling slower, instead of applying the new scale factor directly, you can use a Finterp To node to variate it more slowly. api.unrealengine.com/INT/BlueprintAPI/Math/Interpolation/FInterpTo/index.html
@pierreaudouin6416
@pierreaudouin6416 6 жыл бұрын
Ok i will test , thx
@СтудияТри-Д
@СтудияТри-Д 6 жыл бұрын
Marco Sorry for the wrong post under ur latest video. Can u please help with collision problem on static meshes, which attached to resizeble cube. Resizeble cube collision follow the cube, but attached objects collision stay in the same places where it was in the start.
@marcoghislanzoni
@marcoghislanzoni 6 жыл бұрын
No worries. That is strange, the child components to the cube components should scale exactly the same and their collisions should follow. Unless there is something wrong with the parenting. Can you share your setup via Imgur or similar?
@СтудияТри-Д
@СтудияТри-Д 6 жыл бұрын
@@marcoghislanzoni ok, i will upload img and share link here. And can u please give a hint how to slove problem with teleportating between floors when my teleport trace meet some wall collision ( when im on a second floor it teleports me down floor), or how i can set up BP to block teleportation if my trace meet blocking volume ?
@marcoghislanzoni
@marcoghislanzoni 6 жыл бұрын
@@СтудияТри-Д VR teleportation uses a Navmesh. As long as the navmesh is properly set, there should be no issue with that. There are tutorials explaining how to do a navmesh onto different levels. This one for example: kzbin.info/www/bejne/fYDWm6yee9xsb7M
@СтудияТри-Д
@СтудияТри-Д 6 жыл бұрын
@@marcoghislanzoni kzbin.info/www/bejne/r3iskoiDbpiChs0 here is my example whats going on when i hit wall collision on 2nd floor
@marcoghislanzoni
@marcoghislanzoni 6 жыл бұрын
Студия Три-Д cannot see your video sorry, I don't have a vk.com account
@CanalDojogames
@CanalDojogames 6 жыл бұрын
Another question that im trying to make but its a 2nd option tipe.... Can i static the camera to dont move? Thank you for all the helps! you are the only one person that can answer me on my RPG making ''quest''
@marcoghislanzoni
@marcoghislanzoni 6 жыл бұрын
If you want a static camera you should look into the top down or side-scroller templates. This may also help you: forums.unrealengine.com/unreal-engine/marketplace/1420264-topdown-rpg-template
@CanalDojogames
@CanalDojogames 6 жыл бұрын
@@marcoghislanzoni thank You! I couldnt find on KZbin. I found that coachknights have It but its Very complex blueprint because It has multiplayer.. so i Was going to read a Lot... Thanks to you i can make my own way. Because have an static câmera and Control another Character (actor) is a little hard for me, not Impossible right? I know there is Chronos game that have This method (for VR) and Works great. So im thinking to make It and also make Teleport method to VR player can follow the character when its too Far from view.
@devonroyer2577
@devonroyer2577 Жыл бұрын
Noice
@seanbrownvstheworld
@seanbrownvstheworld 7 жыл бұрын
Great tutorial is there a way to pick it up also?
@marcoghislanzoni
@marcoghislanzoni 7 жыл бұрын
Thanks! Yes. As a matter of fact that is the advantage of using interfaces. If you add the same resize interface to a pickable object you will get objects that can be picked up and resized.
@seanbrownvstheworld
@seanbrownvstheworld 7 жыл бұрын
I'm not a gay man but I love you. Thanks muchly for this. Been looking everywhere for this type of thing and can't find anything about it anywhere. You sir have made my day
@marcoghislanzoni
@marcoghislanzoni 7 жыл бұрын
LOL! :-)
@liellplane145
@liellplane145 6 жыл бұрын
are you some kind of wizard???? Amazing and thank you for sharing with us I would like to be able to change each axis independently depending on alignment to the player - do you think that's feasible??
@marcoghislanzoni
@marcoghislanzoni 6 жыл бұрын
liell plane hahaha, not really, but thanks! ;-) if you want to manage the different dimensions, you can use the 3 dot products of the vector connecting the two hands and the Forward, Right and Up vector of the object. That will tell you to which extent each dimension will be influenced by the scaling.
@liellplane145
@liellplane145 6 жыл бұрын
@@marcoghislanzoni nice thanks!!
VR interactables from scratch - Push-button - Unreal Engine 4
33:12
Marco Ghislanzoni
Рет қаралды 14 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,4 МЛН
Blind Boy Saved by Kind Girl ❤️
00:49
Alan Chikin Chow
Рет қаралды 50 МЛН
ماذا لو كانت الفواكه حية 🥥🍸😜 #قابل_للتعلق
00:42
Chill TheSoul Out Arabic
Рет қаралды 29 МЛН
Боксёр воспитал дикого бойца!
01:36
МИНУС БАЛЛ
Рет қаралды 4,9 МЛН
Grabbing Objects from a Distance in Virtual Reality!
21:16
VR Playground
Рет қаралды 7 М.
VR Pawn Movement using Hand Activated Controls - Unreal Engine 4 Tutorial
18:05
The BEST Mechanical Display You've EVER Seen!!
13:51
Tin Foil Hat
Рет қаралды 626 М.
I Beat Minecraft From One Grass Block
35:27
Beppo
Рет қаралды 8 МЛН
Inventory Wheel in Virtual Reality
18:52
VR Playground
Рет қаралды 4,1 М.
Make a Slider for Virtual Reality - Unreal Engine VR Tutorial
17:18
VR Spectator Screens in Unreal Engine 4
9:19
The Unrealist
Рет қаралды 17 М.
What if Old Minecraft Mobs were Created Today?
28:05
KazooCat
Рет қаралды 847 М.
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 7 МЛН
Blind Boy Saved by Kind Girl ❤️
00:49
Alan Chikin Chow
Рет қаралды 50 МЛН