ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
Drag and Drop physics the way UNITY Intended || Tutorial (NEW 2023)
ฝัง
- เผยแพร่เมื่อ 25 พ.ค. 2023
- github.com/Uni...
In this video, I will show you how to quickly add drag and drop 2D Physics to your Unity games. It is very simple and works with Unity's built-in physics system, so you don't need to install anything new.
Thanks alot, but is there a fix to the physics objects going through the walls when they're going too fast?
Yes! Good question. If you change the rigid body interaction to continuous, it will check for that.
@@robomobius Ok thanks, btw flr much help you get a sub :D
Thanks, worked as expected! Just a reminder for other ppl, add a sprite renderer to a obj, then add Rigid Body 2D, then set the rigidbody type to KINEMATIC and for the final part add a box collider.
Set it to active, not kinematic. This helpful script uses forces to move the objects, which won't do anything on a kinematic collider.
good
Im a beginner and I dont know what he means by layers
Hi! If you look in the inspector there is a Layer property underneath the name of the gameobject. On each rigidbody, change it to a specific layer.
@@robomobius ok ty
Where is the link?
top of the description
none of the tutorials out there worked. BRUH.
edit: i fixed it
If this one didn't work then maybe you are on the wrong version. All of the movable objects in the scene have to have colliders and rigidbodys and be on the same layer. Did you change the class name?
@@robomobius yeah. done all that.. what version of unity did you use? i have 2022.3.2f1 since it installed automatically
also forgot: the script doesn't even show these options and stuff like the drag layer
@@robomobius ay bro! don't forget to make your video contain saving the script before closing notepad++! it worked!
Bruh “copy my homework” isn’t a tutorial
Sorry. I'm just trying to make a simple example of how to use and where to find this asset, so if someone else wants to do something like this, they might find just what they're looking for.
@@robomobius ok all good