Sorry about the mumbling towards the end, the tutorial was long.. If it's not clear, I'll re-upload the video. If you need a non-physics based implementation for magnets, check out the tutorial that Nitrogen made, here: kzbin.info/www/bejne/hZXZnHmHapeYprc
@1d33f1x33 жыл бұрын
This was great, very clear and easy to follow! I modified the force applied by multiplying the mass of the object because I was finding that the magnets didn't seem 'attractive' enough when other objects got too heavy, as well as a check for an object's physical material (so objects with the Metal physical material will be attracted to the magnet).
@bodamat4 жыл бұрын
Amazing tutorials! I love it! Please, don't stop! Thanks!
@Dannington4 жыл бұрын
Thanks - this is very helpful for me at this time! I don't know why you're making the local variables though. I use functions all the time but always just use the input nodes.
@mantaneunzehnhundert5 жыл бұрын
If you use the "Grab/Pick Up Object | Gravity/Physics Gun" Blueprint Make Sure to check "Magnetic" in The Array in the "Trace objects" Function :) thanks for your turorials
@hiddenkonitsu99096 жыл бұрын
When physic + UE4 ==> ⊙_⊙ Thks for tutorial !
@steves_thoughts4 жыл бұрын
Just starting into UE4, to develop an overly ambitious project. This makes me hopeful. Thanks for the great video!
@KisDre2 жыл бұрын
Hello there! Thank you for the video! It's very useful! Also i like to mention that i made some changes to it on my own a bit I made 2 Collision Chanel, Magnet+ and Magnet- , and using their difference instead of the material dif. I did it cause i thought maybe its faster for the PC to decide that is positive or negative, also its also useful if u need to use more different materials on more different object.
@UpsideDownOwl3 жыл бұрын
Great Tutorial Thanks a lot. keep up the good work
@jakanddaxterps53024 жыл бұрын
This was really amazing men
@FisicoAlexandreBonatto2 жыл бұрын
Thank you for posting this video. I am looking for a good software/engine to develop scientific visualization demos: is it possible to, for example, draw the magnetic field lines in UE4?
@foomps68175 жыл бұрын
i started with a fps template and modified the player blueprint with your physics gun tutorial to pick up objects, i can pick up other objects fine but i can't interact with the monopole (watched up to 19:50) and the monopoles don't attracts each other either. I ran the game and checked to see where it was buggin out in the blueprint window and saw that the code gets stuck at ForEachLoop in the ApplyInfluence function and won't exec the next step. Any idea what's going on i have Pole set to Object Type Magnetic with everything on Block and ActionRange to WorldDynamic with everything ticked to Ignore except Magnetic. Physics is simulated and gravity off.
@foomps68175 жыл бұрын
i manage to fix the for loop i just can't pick up the monopoles when i debug with trace i see the ray pass right thru giving me a false in IsValid so i cant pick it up
@Lusiogenic5 жыл бұрын
@@foomps6817 Make sure that the object has "Generate Hit Events" checked. If not, check the collision response to different collision channels that the objects are assigned to.
@spikytiger4 жыл бұрын
@@foomps6817 How did you fix the ForEach loop? My blueprint flow is getting stuck there too.
@foomps68174 жыл бұрын
@@spikytiger this was a year ago, wish I could help you but I don't remember how I fixed it and don't have the file to check anymore sorry.
@silverswordsaint94252 жыл бұрын
@@spikytiger did you ever fix it if so how?
@colinericburriss6 жыл бұрын
Excellent!
@colinericburriss5 жыл бұрын
Oops, i had to add the Magnetic Object Channel to your Gravity/Physics Gun.
@Khaliszt6 жыл бұрын
This is awesome!
@raivo4716 Жыл бұрын
Nice.
@charlesbarnes32496 жыл бұрын
Big thanks for this, exellent! How do you possess the actors in sim?
@Lusiogenic6 жыл бұрын
If you mean how I manipulated them, I've made a tutorial here: kzbin.info/www/bejne/n6POZoF3qquDg8U
@DusanFajler6 жыл бұрын
What is the easiest way to compare and separate poles in your opinion? I making a game where player can change poles so i have an idea to do it by tag-. I need to be able to easily change polarity in the editor, but I don't want to use materials for obvious reasons. Awesome tutorial.
@Lusiogenic6 жыл бұрын
I would say the best thing would be to make each actor a monopole magnet, then spawn Physics Constraint Actors to tie them together if you want to make a dipole dynamically. Of course you could use tags, or just implement simple public functions getPolarity / setPolarity for the monopole. If you have multiple simultaneous interactions that you want to manage, consider implementing a management function in the level blueprint. Each magnet would notify this function if it detected another magnet and the function would send back if the magnet needs to change polarity. Also, the function could tie monopoles together into dipoles.
@DusanFajler6 жыл бұрын
Lusiogenic That makes sense. Thanks a lot
@idanben-moshe13174 жыл бұрын
Will this work with particles magnet to each other? Like click and drag one particles and the others will follow creating a big blob? I want to do this to nvidia flex liquid water particles, clicking on a water surface and extracting a big chuck of water floating
@waqar_asgar__r72942 жыл бұрын
The spin issue doesn't really get fixed with the fix you gave. The actors still spin after attracting each other. Thankfully for my usecase I need the other actor to be static, so it's not much of an issue for me.
@hiddenthings48203 жыл бұрын
How you are able to move the magnet while play at 19:33
@dwemermaniacsworld33016 жыл бұрын
Tnx for tutorial
@jakecrown68995 жыл бұрын
How can I have my view port set up like that so I can click and move around the magnets in space while they update in real time
@danielclark53855 жыл бұрын
At what point? To simulate he just presses play to interact with the view port at the beginning of the video.
@jakecrown68995 жыл бұрын
@@danielclark5385 I am unable to click and drag on the objects in the scene to physically move them around while it is simulating, I dont know how to set up my project so I can
@JeffreyZweigII3 жыл бұрын
Everything seems well explained, but I got about halfway through the tutorial before I realized I needed to build the function to grab the blocks. It wasn't until I saw Manta's comment that it clicked for me, because the baseline 1st person doesn't have the capability (as far as I know as of the time I made this comment). It would also be nice to know where he's starting from here, as far as is it the base 3rd person starter content? He just kinda starts, and I can't even move the block to test them. Edit: I did discover later that he made a Gravity Gun tutorial which should work, but there are tutorials to get your stuff set up if you were like me and you don't have that functionality. kzbin.info/www/bejne/n6POZoF3qquDg8U