Тёмный
No video :(

Getting Started with Unity DOTS Physics 

Code Monkey
Подписаться 537 тыс.
Просмотров 91 тыс.
50% 1

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 162   
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Let's look at Unity DOTS Physics! Easy to use with the promise of thousands of physics objects! What Physics demos would you like to see? 🎮 Play 7 Awesome Games (Action, Strategy, Management) and Help Support the Channel! ✅ Get the Game Bundle 67% off unitycodemonkey.com/gameBundle.php
@guilllexx
@guilllexx 4 года назад
this video is so cool :) can you make a video on gravity? ... gravity on a planet, gravity system with player moving inside a traveling ship, gravaity toward one or multiple objects, fading gravity over distance ...
@dert.3747
@dert.3747 3 года назад
There is a litte error in your update-function where you call Raycast with the direction vector, not the end-point. You call "Raycast(ray.origin, ray.direction * rayDistance)" instead of "Raycast(ray.origin, ray.origin + ray.direction * rayDirection)". Otherwise very helpful as always!
@skippythemagnificent8103
@skippythemagnificent8103 3 года назад
I'm getting errors on .entities in the Trigger events, is this depreciated or somthing i am doing, I appreciate this was done some time ago, could do with a heads up :)
@gabrielalabi4385
@gabrielalabi4385 4 месяца назад
really helpful video. Does Physics Shape support 2d
@KimboKG14
@KimboKG14 4 года назад
Took me 4 days of my vacation, but I finally built a multithreaded raycast system in 3D space. Except for you & that other DOTS-guy on yt there is just no resources except for the api. We really need to share and spread the knowledge if we want more indie devs to use DOTS! I miss those official unity tutorials.... Hope you keep up the good work.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Sorry about my voice being a bit off, been a little sick lately, hope you like the video!
@factopiavideos
@factopiavideos 4 года назад
yassss!! keep making videos about complex topics like these. Thank you
@sanderliivandi8498
@sanderliivandi8498 4 года назад
Hello! I would like to point out that when following along with a fresh project, it is also necessary to install the Hybrid Renderer package as otherwise the entities do not get rendered. This has been mentioned in your ECS tutorial, but I managed to forget that and for some time could not figure out, why the cube and sphere kept disappearing :D
@andywatts
@andywatts 4 года назад
Very cool. Covered a lot in 20 minutes. Thank you.
@siddharthgupta9403
@siddharthgupta9403 4 года назад
Amazing video! You have one of the best videos currently available on Unity DOTS. Keep going!!
@vildauget
@vildauget 4 года назад
Very nice video to get our feet wet in DOTS Physics - thank you. Hope you feel better.
@geri4367
@geri4367 4 года назад
Awesome! I'd love to see some sort of mini game done fully with DOTS physics. Something like a basic spaceship shoot em up. Also curious if there is some kind of animation system setup for DOTS or not
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Yup I was thinking of trying to make Space Invaders, sounds like it could work as a simple game and then play around with thousands of enemy ships. I believe there's a Animation system currently in the experimental stage.
@kil98q
@kil98q 4 года назад
looks like an insane amount of code to let that ball jump :(
@quoctuanlee3544
@quoctuanlee3544 3 года назад
It's a pain in the ass but if we want to squeeze out any ounce of performance from it, we have to :(
@kil98q
@kil98q 3 года назад
@@quoctuanlee3544 But the idea of getting a huge robot swarm to work sounds pretty worth it ...
@vrtech473
@vrtech473 4 года назад
A tutorial of 2D Physics with 10,000 units bouncing around would be a great learn and fun :)
@4DGlasses
@4DGlasses 4 года назад
Yes please
@KimboKG14
@KimboKG14 4 года назад
your tutorials are absolutely amazing! On the spot, awesome audio, and very well researched! Plus unity is finally starting to get stable again. I made one "pure ecs" game long time ago and looking to make a new one now that we have the neccesary systems in DOTS.
@KimboKG14
@KimboKG14 4 года назад
Actually the raycast job is automatically scheduled in parralel. The trick is to built->cast->execute in a multithreaded chain! But thanks to your tutorials and 2 days of my vacation I finally have 1k entities casting for the player. Point is thought, results are returned as unityEngine.Raycasthit so you need to manually convert your desired information into bittable values for further implementation in jobs. Posting my basic script on my channel soon. Thank you so much for making so good tutorials. It's just such a shame that unity hasn't made ecs tutorials like they used to with mono. Especially when it comes to such basic things as raycasting.
@mehmedcavas3069
@mehmedcavas3069 4 года назад
Yess finally 😍
@hamzamgaad7131
@hamzamgaad7131 4 года назад
where do u learn all this ? there is just a few resources on the web !!
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
I read the Documentation, Manual, analyze the official samples and do lots of trial and error. These complex DOTS videos take a long time during research before I can make the video.
@donkeymonkey4435
@donkeymonkey4435 3 года назад
@@CodeMonkeyUnity U are Absolutely Great!
@piyushmayekar1192
@piyushmayekar1192 3 года назад
This channel is so good! Top tier explanation: precise & concise. Thanks a ton!!
@MikevomMars
@MikevomMars 4 года назад
Are there any drawbacks on using both, "normal" and DOTS stuff together in a project? Are there any benefits from partially using DOTS in a project?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
You can and you should mix them together where it makes sense. That's exactly what I'm covering in the video going live later today, it uses normal game objects for my animated units but then uses super fast DOTS Pathfinding to calculate the path. So you can definitely build your games the normal way using game objects and then just convert the performance intensive parts into DOTS
@JamesBowling
@JamesBowling 4 года назад
Thanks for the awesome tutorials. I've found them incredibly helpful for getting my head around the all this DOTS stuff. Small thing with your raycast, I'm fairly sure that should be Raycast(origin, origin + direction * distance), not Raycast(origin, direction * distance)
@starburstdragon
@starburstdragon 4 года назад
Great vid - thx :) - there is extremely small number of vids/examples etc that cover unity.physics imo
4 года назад
What I would like to see is unity dots physics and netcode integration. Just started playing around with it a bit myself :)
@xaxababa6616
@xaxababa6616 4 года назад
Holy ****! I was thinking about this just now!! Thanks CM!
@andrewshandle
@andrewshandle 4 года назад
I'm really enjoying your content, this is great video. Thanks!
@marcaurelio74
@marcaurelio74 4 года назад
Really useful tutorial! Thanks for your effort!
@azaroth75
@azaroth75 4 года назад
This is a gold nugget, ty!
@BRINK2011THEGAME
@BRINK2011THEGAME 4 года назад
DOTS implement 2D physics as well?
@jamesmillerjo
@jamesmillerjo 4 года назад
Yay! I wanted this!
@russellthorburn9297
@russellthorburn9297 3 года назад
I'd love to see you implement the preview version of the Havok Physics Engine.
@MrGreenlund
@MrGreenlund 3 года назад
With the raycast you do at around 12:00, is it possible to access the Physics Shape that the ray hit? I've previously in normal unity physics used it to make my 3rd person camera ignore objects that are very thin etc.
@NinjaSlv
@NinjaSlv 2 года назад
are you using any additional packages for Dot physics?
@warlockCommitteeMeeting
@warlockCommitteeMeeting 4 года назад
Thank you for sharing this valuable information
@fruei_
@fruei_ 4 года назад
Hello , awesome video !! . I need help, i'm trying to implement ICollisionEventJob :C, need to play a hit sound when a ball touch a wall or any other object, i need to know if a collision has ocurred, sorry about my english im from argentina
@zhongyechen7639
@zhongyechen7639 3 года назад
thanks for your video, it is very very very helpful
@sabrango
@sabrango 4 года назад
Thx! Why I didn't watch this so far?
@ramjir6788
@ramjir6788 9 месяцев назад
I have a doubt, entities can only interact with entity? Can a regular rigidbody interact with entity having rigidbody ?
@seanloughran6714
@seanloughran6714 4 года назад
Really awesome video. I know its in its early stages, but who man they need to make Raycasting way less verbose.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Yeah the Raycast is great in how many options it has but it definitely needs a simplified utility function.
@yayaskurt
@yayaskurt 2 года назад
Hi, thanks for this tutorial. I wonder why if restitution is 1 it looses velocity on each impact?
@Unforgiven215
@Unforgiven215 4 года назад
I'm having a hard time wrapping my head around how ITriggerEvents work. Is the job you created scheduled only when there is a collision with a trigger, or is it scheduled every frame? Is there documentation anywhere where ITriggerEvents are explained?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Check the official Unity DOTS Physics samples, there's several demos there that use Triggers
@taobowen2016
@taobowen2016 3 года назад
Unfortunately the scripts from DOTS/Physics has gone...
@taobowen2016
@taobowen2016 3 года назад
All right, install unity physics from package manager and then scripts come out..
@quzant9745
@quzant9745 3 года назад
Good day! The keys W, A, S, D do not work for me when driving, what could be the problem?
@iCraftDay
@iCraftDay 3 года назад
if your rigidbodys don't fall down, install Havoc physics package (I think)
@Unforgiven215
@Unforgiven215 4 года назад
Is there a significant performance gain from using this physics system over the old one? Could you for example have something like 10k rigidbodies with good performance?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
I haven't tested the limits yet but yes it should work for thousands of rigidbodies. With normal game objects things start to slow down when you have something like 5k game objects whereas in ECS you can have 100k+
@MNenad
@MNenad 4 года назад
Great tutorial again, but I have a question: I used the bitmask (1u
@taylors1545
@taylors1545 4 года назад
How would you efficiently handle different collision pairs? For example: The player and enemies shoot a different projectile type. Each projectile plays a different sound and particle system on impact. Each projectile has their unique sounds / particles for hitting different 'pairs' such as the player, an enemy, the floor, the walls, etc. Would you write a single system, then depending on the pairs invoke the proper logic using a function pointer?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Identify objects with Tag components and do the logic based on the Tags. I haven't tested so not sure if it would be better to have a single Job handling all possible interactions or multiple Jobs each handling a specific type of interaction. I'm guessing more Jobs will have some overhead but it's likely worth it to keep your codebase nice and clean.
@iCeDrAgOn2025
@iCeDrAgOn2025 4 года назад
DOTS is definitely going to be a unique beast to work with once it is finally out of preview. I just honestly hope that they come up with a better way of actually controlling the beast that they're unleashing. What I mean by that is, it is so easy to set things up, But after that initial setup getting access to the underlying data can be nightmare. It's kind of like giving your data to a bank to look after (Unity) then having to break in to said bank just to get access to be able to use it and make simple changes to it. Not to be hard on Unity because I think they're moving in the right direction with what they are doing... But at the same time I think that they need to take a step back and really focus. and this is actually where Unreal has an advantage over Unity, Epic they themselves have made a AAA game with their own engine. Unity has not, Sure, Unity has came up with some AAA looking in game footage, but it's not intractable. It's more or less a movie and not so much a game. And making a movie vs a game is completely different, there are so many things to consider. Still keep up the good work and exploring the new tech as it comes out, it's great to see some insight in to how it all works and what is potentially possible.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Are you talking about DOTS Physics specifically or DOTS in general? I agree DOTS Physics does seem a bit too complex but DOTS as a whole is already quite a lot user friendly. They have improved usability tremendously these past 12 months and by the time DOTS Core is out of preview it should be very usable.
@iCeDrAgOn2025
@iCeDrAgOn2025 4 года назад
@@CodeMonkeyUnity The DOTS Physics seems to be overly cumbersome at this point, especially with what you showed with having to write your own function that is built on the Unit's regular physics. But that in and of itself is partly because it's still in preview so that's understandable that there is going to be some functionality missing. But I was also talking about DOTS in general. Yes it has made leaps and bounds over the past 12 months by adding several QOL features and streamlining the syntax that makes it somewhat easier to work with. But in the end you still have to go though thousands of entities just to find maybe 1 that has met a certain condition. Now to me, that sounds counter productive because it seems to be that the flow control of your program is one way and if you didn't have the mass parallelism provided by BURST it would be worse off than the current GameObject Model that people are used to. Take for example with traditional GameObjects sure there would be iteration to possibly change values on several similar objects, and once that object's data has reached a certain condition it has a way messaging the system that something needs to be done, either through events or some form of other call back feature which can identify that specific object. But with DOTS, right now there is no real way to isolate specific data (at least in the examples I've seen online), if you're creating a job to work on a set of entities, then you have to make another job just to handle entities that have met certain conditions. And to me, that seems more system oriented than it does data. if you have a scene with 50,000 tree entities that have a translation component and 1 player, and you go searching for the player using foreach, but also wanting it's translation so you can move it. it's still going to have to go through all of the trees until it finds the entity with the the player tag and the translation component. Hopefully that will make sense to you. And it could be that I am missing something here. Have they done away with using archetypes which would kind of minimize that problem because then you can just create specific entities based on an archetype and separate them out in to tree and player and just look for the player archetype and completely exclude looking through all the trees
@johncardussi
@johncardussi 3 года назад
I only need 2D raycasts to detect clear driving paths for cars. Is there a lot of speed to be gained by switching to DOTS physics?
@quoctuanlee3544
@quoctuanlee3544 3 года назад
When I put stepPhysicsWorld.Simulation at 17:43 , Unity logs out an error that says: cannot convert from Unity.Physics.ISimulation to Unity.Entities.EntityQuery. So what can I do now?
@electromorphous9567
@electromorphous9567 4 года назад
Such cool. Much helpful.
@hamsg
@hamsg 3 года назад
idk what to think about dots lol making a gameobject jump when it hits the trigger but its 10x the code length and complexity.
@LukeAps
@LukeAps 2 года назад
The point is that it's 100x faster. You can have 10000 DOTS balls jumping at 120fps. Or. 100 normal balls jumping at 30fps. 6 months old, but still.
@iskatoysen
@iskatoysen 3 года назад
I can't control any car in demo, how did you do it?
@stesproject
@stesproject 3 года назад
Hi! Great tutorial!
@jamesmillerjo
@jamesmillerjo 4 года назад
Can you explain why velocity of both EntityA & EntityB would be modified when collision triggered? Isn't A&B refers Ball & Ground? Why only ball jumps up despite of both entity's velocity changed?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
The Floor entity does not have a Velocity component, it only has a Collider component so that's why it doesnt move. If you add a Rigidbody or a Physics Body component then it will end up with a Velocity component which will end up both jumping.
@jamesmillerjo
@jamesmillerjo 4 года назад
@@CodeMonkeyUnity Oh, so you mean ball can be A or B by collision case, and it's better applying velocity all of them (and nullify v of floor) than taking overhead deciding which one is ball and which one is floor... Is it right?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
@@jamesmillerjo Yup the ball can be either A or B. In this simple demo I just tried to modify the PhysicsVelocity or both entities but if you want more specific logic you could add another ComponentDataFromEntity to specifically identify which one of the two is the ball.
@dr_UiD
@dr_UiD 4 года назад
​@@jamesmillerjo No he is not applying velocity to all of them . He is testing wich one is Ball and wich one is Ground.
@Decurion
@Decurion 4 года назад
In scene start. My objects destroyed, why? I dont see cube and sphere.
@ajaykumar-qw3qr
@ajaykumar-qw3qr 4 года назад
can't find the "Physics shape " under DOTS and Physics.why?
@jamesmillerjo
@jamesmillerjo 4 года назад
You implemented 'directly adding dots physics' example by adding conversion script to game object (in editor), then can I make that process fully code-driven by creating object-adding components-adding conversion script? If not, is there a way to *make dots phsics object by pure-ECS approach* ?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Sure you can make everything straight through code, create an Entity and manually add the Physics components you want like PhysicsVelocity.
@Kidopya
@Kidopya 3 года назад
Aren't there Physics Shape and Physics Body for 2D sprites?
@AbyssalManta
@AbyssalManta 4 года назад
Might be a stupid question, but how do you actually use the samples? The instructions tell you to create a new project, import the Hybrid Renderer and stop there. Where do the files you download from the GitHub enter the picture?
@tensennojin
@tensennojin 24 дня назад
Why the object is not falling at all? i followed all the steps for DOTS version but it remains still.
@CodeMonkeyUnity
@CodeMonkeyUnity 22 дня назад
The API has changed a lot in this video. Nowadays all you need is to make a subscene and add a Game Object with a Rigidbody, it will automatically be converted into DOTS physics ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4ZYn9sR3btg.html
@zhongyechen7639
@zhongyechen7639 3 года назад
I am new to unity, I don't know why I give my entity to rigibody. My entities will fall to the bottom of the map, I am sure I have added colliders. Mine is the need to detect the entities near each entity. In addition to using rigibody.index. Is there any other way to get entity? does there have collider.index somthing like that. I check unity.physic, I need to use Overlap query to do that. Thank you. I am not sure what to do, I am not sure do you have these kind of tutorial. if has, please let me know.. Thanks very much.
@Decurion
@Decurion 4 года назад
Can i used colisions, and dont use phisics simulation?
@sachanhardik
@sachanhardik 4 года назад
The way you did ITriggerEventsJob, i did ICollisionEventJob but I am getting a memory Leak. Any thoughts?
@mathiasjensen2841
@mathiasjensen2841 4 года назад
Try using the attribute [updateAfter(typeof(StepPhysicsWorld))] on your system
@sachanhardik
@sachanhardik 4 года назад
@@mathiasjensen2841 Thx
@siemasiemasiem
@siemasiemasiem 4 года назад
Great video. Please, cover the joints topic in next vid. BTW. What you mean by Havok is not free? Unity don't adds Havok to the free version or what? I have to pay havok's people to make a game with havok in Unity?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Yes Havok is a third-party Physics engine used by many AAA games and yes it has a paid license. Not sure how much it will end up being, it's still available as a free trial. Unity Physics on the other hand is free included in Unity.
@alphabetadministrator
@alphabetadministrator 9 месяцев назад
Hey Code Monkey, for this specific tutorial, did you use the built in render pipeline or SRP? This is crucial to me since I cannot upgrade URP or HDRP from the built in render pipeline and need to make ECS collisions work on the built in render pipeline. Thanks in advance!
@CodeMonkeyUnity
@CodeMonkeyUnity 9 месяцев назад
Physics shouldn't have anything to do with rendering. This video is pretty old, here I believe I was using the Hybrid Renderer which I believe is related to URP
@Other-Stickman-Games
@Other-Stickman-Games 3 года назад
Awesome
@mattn5933
@mattn5933 3 месяца назад
Hello, With Unity 6 coming out and DOTS being a highlight of it, are there any plans on updating any of these tutorials?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 месяца назад
Yup! RU-vid doesn't support updating videos but I plan to remake them using Unity 6, I'm currently playing with DOTS Physics right now for my upcoming DOTS RTS course
@user-xj5hp7xv3x
@user-xj5hp7xv3x 4 года назад
5:21 when i start scene objects destroyed. Why?
@nnNothing
@nnNothing 4 месяца назад
it's basically completely different from old system like learning from different Game Engine
@themirlabs
@themirlabs 4 года назад
using Unity.Physics dose not work for me. im not sure why but that extension dosent exsist. i have installed the physics package like stated in the video. PLEASE HELP!!! also love your videos. a tutorial on making a space game with realistic physics would be awesome. i wanna make spaceships!
@shubhrojyotikabiraj8322
@shubhrojyotikabiraj8322 Год назад
JobComponentSystem is depreciated and instead SystemBase is used. What modifications are required in code because if i use SystemBase, i cannot get JobHande inputDeps from anywhere
@shubhrojyotikabiraj8322
@shubhrojyotikabiraj8322 Год назад
I have modified the code here a little (it working but giving errors): protected override void OnUpdate() { JobHandle jobHandle = Dependency; TriggerJob triggerJob = new TriggerJob { physicsVelocityEntities = GetComponentDataFromEntity() }; triggerJob.Schedule(stepPhysicsWorld.Simulation, Dependency); Dependency = JobHandle.CombineDependencies(Dependency, jobHandle); }
@shaunhall7894
@shaunhall7894 4 года назад
Code Monkey. What a great vid man. Side by side comparison of using a gameobject vs DOTS. Brilliant! I hate to request another idea on top of all the others we are suggesting for you, but #Geri mentioned on here of doing a small game in DOTS. I second that idea. Similar to a Flappy Bird style game..? I would love to give you a one-time donation. You have a Paypal, GoFundMe?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Yeah a small complete game is definitely something I'm looking into. You can get the Game Bundle which really helps and you get some cool games to play! unitycodemonkey.com/gamebundle.php Thanks!
@muuubiee
@muuubiee 4 года назад
Have you done any tests to see what kind of performance difference this gives?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Not yet, I'm planning some torture tests soon, but if the other DOTS tests I've done are any indication that this can be 1000x faster.
@GunslingerP
@GunslingerP 4 года назад
Could you make a tutorial on everything needed to start a new project from scratch? I can't seem to figure out why whenever I start a new project, add entities, add physics etc... I get a lot of exceptions and nothing is working.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
If you want to work with DOTS then open a completely blank project and install the Entities package, in doing so it will automatically get all the related dependencies like Jobs. If you add the Physics package afterwards you might get some issues with the Performance API, you need to manually select the correct versions, I'm guessing that's an issue that will be solved soon.
@SimplyVanis
@SimplyVanis 4 года назад
Will the DOTS code will become shorter? It looks like a lot of code for really simple mechanics trying to achieve. And the code seems to repeat for entities as well. Is it because the DOTS is still in development?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
It's still very much in development and the amount of code is constantly being simplified so yes I assume it will continue in that direction.
@atur94
@atur94 4 года назад
ECS is another level of coding. Extremely hard
@likeyou3317
@likeyou3317 4 года назад
The ball with rigidbody stops bouncing after a second, losing all energy. :/ + the raycast is not accurate, looks like the center of sphere collider is 1cm higher than the actual shpere, but its not. So I have to 1cm higher.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Even if you give it perfect bounciness the underlying values are stored in floats so you don't have infinite precision which does mean that eventually it all comes to a stop.
@likeyou3317
@likeyou3317 4 года назад
@@CodeMonkeyUnity Thats an answer I didnt expect. Thanks for tutorial, gonna work with dots so I grab anything i can find
@divyanthj
@divyanthj 3 года назад
Where do I find the package files? I can't find it in my package manager.
@Lelefant_
@Lelefant_ 3 года назад
To see preview packages, enable them in the settings inside the Package Manager. But, with 2020.1 they removed the pre-preview packages, e.g. the hybrid renderer. They describe a workaround here: docs.unity3d.com/Packages/Installation/manual/index.html In short, you can click "Add package from git URL" and paste the corresponding unity package name (e.g. com.unity.rendering.hybrid )
@highlewelt9471
@highlewelt9471 4 года назад
Where is the documentation shown in the video? God I hate to navigate Unity's online resources
@dabspace5541
@dabspace5541 4 года назад
Hey I am completely new to game development so which video should I see
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
If you're completely new to Unity start off with the Basics playlist ru-vid.com/group/PLzDRvYVwl53vxdAPq8OznBAdjf0eeiipT After that look through the video list for more beginner tutorials or try following one of the complete simple games I have like Flappy Bird and Snake ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-b5Wpni9KPik.html
@dabspace5541
@dabspace5541 4 года назад
Code Monkey ,thanks a lot
@marvalgames3939
@marvalgames3939 4 года назад
Great as always. Another inept tutorial?? That's what it sounds like to me for some reason.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Heh it's "in-depth" but yeah I can see how it sounds a bit odd
@josueccama303
@josueccama303 4 года назад
Thanks for your videos, I have a question. In case you want to control collisions and physical 2D, how would you do it?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Right now DOTS works solely in 3D so there's no dedicated 2D Physics but you can easily just make sure the Z never changes.
@josueccama303
@josueccama303 4 года назад
thanks, for the answer, I wait for the next chapter of codemonkey :).
@neon1595
@neon1595 4 года назад
Hello Code Monkey :) What are your thoughts on the new HAVOK Physics? Should someone like me use it in my project instead of the Unity Physics?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
I haven't fully tested both in order to compare but I believe Havok works faster so if speed is absolutely necessary go with Havok. Although Havok is paid for whereas Unity Physics is free.
@usmanmemon
@usmanmemon 4 года назад
Havok physics is free for unity personnel and maybe is free for plus
@47Mortuus
@47Mortuus 4 года назад
Is it still accurate? Is unity physics changing constantly at the moment?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
It's still in development but I believe everything in the video still works
@nukulargames6315
@nukulargames6315 4 года назад
How well does regular unity physics and DOTS physics play with each other? Like, say DOTS colliders hitting gameobject colliders? Or DOTS rays hitting gameobjects?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
They don't interact, they live in completely different worlds. You can mix them in the same scene but they don't collide between systems.
@nukulargames6315
@nukulargames6315 4 года назад
What about a hybrid approach, using only DOTS physics but still referencing the original gameobject with monobehaviors that aren't DOTS friendly.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
@@nukulargames6315 Technically you could have an invisible collider in the DOTS World and on every Update move a GameObject to the same position as the Entity but that is a very convoluted way of doing things.
@turntupgamer878
@turntupgamer878 4 года назад
thank you
@jean-michel.houbre
@jean-michel.houbre 4 года назад
Hello, difficult to use the project on Github: tons of errors ^^. On your video, the InputSystem package does not seem to be installed. Because of namespace errors, I installed it, and I went from 110 to 22 errors : \ The remaining errors are mainly "Assets \ Common \ InputActions.cs (791,39): error CS1061: 'InputActionAsset' does not contain a definition for 'GetActionMap' and no accessible extension method 'GetActionMap' accepting a first argument of type 'InputActionAsset 'could be found (are you missing a using directive or an assembly reference?) " . I will watch the video quietly and try again when I can understand these errors...
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
What version did you open it on? The samples github comes with the entire project so it should already have all the packages installed correctly, open the project folder with 2019.3.0f1
@jean-michel.houbre
@jean-michel.houbre 4 года назад
@@CodeMonkeyUnity 2019.3.0f1. It is nice to want to help me, but I think that I am not yet learned enough on Unity to advance on this subject. I prefer to wait until I have a little more knowledge, in particular on the new input system. I followed the rest of the video, I almost finished it, it is very interesting (still struggling with the English language, despite the efforts of those who make the subtitles). I am trying to reproduce your actions, and I will point out very small difficulties: - when you type the code, you are quite often at the bottom of the screen, where the subtitles are located. So pause, move the subtitle bar, resume reading. It's just boring. - sometimes you go very quickly with the mouse, without commenting. You must then go back and scan the screen. Nothing insurmountable, it's just boring. Your videos deserve to have more views, and I find them really very interesting, we always learn something from them. In fact, I watch very few English channels, but the lack of quality French channels is a powerful motivator ... And in addition, I feel that my level of English is improving :). As I wrote to you (it seems to me that I used the form on your site), I bought your games, and I made comments and proposals. I had a good time with these games, and I still do. Thank you again for all these videos and happy new year 2020.
@tranceemerson8325
@tranceemerson8325 4 года назад
Epic Hello World Program.
@medmel2160
@medmel2160 4 года назад
Would it be possible to use "rigidebody based on assets" in an ECS project just by putting "convert to entity" like you did?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Yes when you add ConvertToEntity it will convert a normal Rigidbody component into a DOTS Physics Body
@medmel2160
@medmel2160 4 года назад
@@CodeMonkeyUnity great, good to know ! thank you, and amazing video as usual.. :)
@EYErisGames
@EYErisGames 9 месяцев назад
@@CodeMonkeyUnityWhere is the ConvertToEntity script?
@NachoMan154
@NachoMan154 4 года назад
My Sphere does not fall. Without converting them to entities it works! :/
@agtechart
@agtechart 4 года назад
Hi CodeMonkey! What is exactly World.DefaultGameObjectInjectionWorld ?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
It's the default world that gets created and what the objects with the ConvertToEntity script get instantiated into.
@agtechart
@agtechart 4 года назад
@@CodeMonkeyUnity got it, thanks so much!
@random_precision_software
@random_precision_software 4 года назад
Can you do the HAVOK physics as well?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Yes, you can easily swap between the two
@random_precision_software
@random_precision_software 4 года назад
@@CodeMonkeyUnity I should of made it clearer ...can you do a video on it..I tried and got weird results lol
@user-kn8xx9rn6b
@user-kn8xx9rn6b 4 года назад
我觉得up主很强
@JamesWjRose
@JamesWjRose 4 года назад
The line: return triggerJob.Schedule(stepPhysicsWorld.Simulation, ref buildPhysicsWorld.PhysicsWorld, inputDeps); is showing an issue: the call is ambiguous between the following methods or properties: IBodyPairsJobExtensions.Schedule(T, Simulation, ref PhysicsWorld, JobHandle) and ICollisionEventJobExtensions.Schedule(T, ISimulation, ref PhysicsWorld,JobHandle) I have posted the issue here: forum.unity.com/threads/itriggereventsjob-schedule-compile-error.877681/ and if you or anyone has the solution, or even a clue.... If I find the solution I will post back. ------------------------- EDIT 1: I attempted to run the Unity Physics samples, and they too get this error. So it seems it's something to do with my system. I will update again when I find something else. EDIT 2: Solved. I was using Visual Studio Community 2015 and upgraded to Visual Studio Community 2019 and the conflict was resolved. I have no idea why upgrading the IDE resolved the conflict between two functions... but it worked for me. ------------------------- Thanks for this video and all of them, they are a great help.
@anonymousone4824
@anonymousone4824 4 года назад
Idk why but 2:18 make me laugh
@gawer33
@gawer33 4 года назад
nice one but can we off and on that feature without uninstalling unity dots physics
@sorackengamer6507
@sorackengamer6507 4 года назад
Hi!
@twitchizle
@twitchizle 4 года назад
All i want local wi-fi based multiplayer game.
@lieQT
@lieQT 4 года назад
Doing the networking for games is relatively abstracted from the actual hardware, so learning client/server and p2p architecture will be relevant regardless whether its LAN/WiFi/WAN/p2p - applications dont actually care whether their data is sent via wifi, ethernet cables or some other fake adapter as you might see in a vm. Youd wanna start looking into UDP, bidirectional communication etc
@cyberpegasus1311
@cyberpegasus1311 4 года назад
Is this chinese?
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
What is chinese?
@cyberpegasus1311
@cyberpegasus1311 4 года назад
@@CodeMonkeyUnity dots in general, i didn't understand anything xD
@siddharthtrivedi3322
@siddharthtrivedi3322 4 года назад
If Unity started adding this kind of complex features then they will easily lose their users because in the market game engines are coming those make your life more easy day by day. One name is Buildbox, they will provide big competition in this.
@CodeMonkeyUnity
@CodeMonkeyUnity 4 года назад
Game Objects and MonoBehaviours aren't going anywhere, if your game has no issues with performance then by all means keep making games as you've always done. DOTS is simply another option that is extremely performant. There are many (most) games which have limited design due to performance limitations, that is what DOTS is meant to solve.
@siddharthtrivedi3322
@siddharthtrivedi3322 4 года назад
@@CodeMonkeyUnity Yes I understand your point and you are doing really good :) I am just talking generally, maybe Unity make this thing compulsory in the future as like they will do LDRP as their default render pipeline.
@alexandreamiel1865
@alexandreamiel1865 3 года назад
protected override void OnUpdate() { CollisionWorld collisionWorld = m_BuildPhysicsWorld.PhysicsWorld.CollisionWorld; UnityEngine.Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); Vector3 rayEnd = ray.origin + ray.direction * 100; if (Input.GetMouseButtonDown(0)) { // Vector3 mousePos = Camera.main.Scr IgnoreTransparentClosestHitCollector collector = new IgnoreTransparentClosestHitCollector(collisionWorld); var raycastInput = new RaycastInput { Start = ray.origin, End = rayEnd, Filter = CollisionFilter.Default }; collisionWorld.CastRay(raycastInput, ref collector); RaycastHit hit = collector.ClosestHit; Debug.Log(hit.Entity); } }
@Jewelsonn
@Jewelsonn 4 года назад
Too Time consuming,
Далее
Unity DOTS - What changed?
13:00
Просмотров 37 тыс.
Unity Job System - A Practical Code Example
13:50
Просмотров 81 тыс.
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 706 тыс.
Unity DOTS vs Handbuilt: Sample Project
27:56
Просмотров 676 тыс.
How Games Have Worked for 30 Years to Do Less Work
23:40
Getting Started with the Job System in Unity 2019
25:54
Steam EXPERT teaches you Game Marketing for SUCCESS!
52:22
What are Subscenes in Unity? (Massive Worlds!)
15:51
Просмотров 95 тыс.
The Most Impressive Scratch Projects
11:00
Просмотров 4,9 млн