Unity3D Physics - Rigidbodies, Colliders, Triggers

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ต.ค. 2024

ความคิดเห็น • 134

  • @umairmunawar132
    @umairmunawar132 5 ปีที่แล้ว +87

    I just wanted to say "Thanks a lot, Jason". I have been doing Unity game development as professional game developer for 5 years now and your videos even about the basic stuff still help me improve a lot. Please, keep up the good work.

  • @victormorris4600
    @victormorris4600 5 ปีที่แล้ว +14

    Even though I've been using Unity for 2 years now, this helps me improve alot

  • @silencedvr2048
    @silencedvr2048 4 ปีที่แล้ว +4

    i love how after you explain stuff 100 people already tried to explain me, i get it. all these people are too stuck in their current knowledge about the engine and scripting. while you can easly re-live your newbie days and explain if you are explaining it to passed you. and thats a skill to admire. well done sir

  • @bramblewoodhall4757
    @bramblewoodhall4757 6 หลายเดือนก่อน

    thanks for this: I was going nuts tilting planes and not having objects fall off them and couldn't figure out what was going on. This video was really helpful and helped me understand Unity physics - my game might even work now :)

  • @QuackersMcCrackers
    @QuackersMcCrackers 4 ปีที่แล้ว +43

    "We should be able to watch. Our ball. Fall."
    "Let's hit play"
    *Ball falls*
    *Blep*
    ._.
    *Thunderous applause*

    • @cinegraphics
      @cinegraphics 3 ปีที่แล้ว +1

      "I want my ball to be bouncy."
      Ummmm...... okay. But keep in mind that testing may prove painful...

    • @TheOneTaboo
      @TheOneTaboo 3 ปีที่แล้ว +1

      Made my night

    • @QuackersMcCrackers
      @QuackersMcCrackers 3 ปีที่แล้ว

      @@TheOneTaboo I am James, maker of nights :3

  • @sunilgoswami007
    @sunilgoswami007 3 ปีที่แล้ว

    I know the basics of these but there were still quite a good things that I got from this. And that about swapping OnCollisionEnter with OnTriggerEnter, oh man, been there done that several times even in my limited experience with Unity. Good to know it keeps happening.

  • @williamsando4703
    @williamsando4703 4 ปีที่แล้ว +9

    Even though I've been using Unity for a full week this has still helped me tremendously :D But seriously, it's videos like this that make all the difference, thank you!

  • @ZoidbergForPresident
    @ZoidbergForPresident 5 ปีที่แล้ว +2

    Knew about most of those, but it's nice having a video explaining all the stuff, good job.

  • @kingXkeith
    @kingXkeith 5 ปีที่แล้ว +2

    I literally am doing a lab due Monday on this subject as i got your notification. This helps alot!

  • @kyleme9697
    @kyleme9697 4 ปีที่แล้ว +1

    Great video, very thorough.
    26:55 In my limited experience I've found Force amounts are in the 100s, Rotation are in the 10s, and Movement are in the 1s. I was using the same value for rotation and movement speeds and spent hours trying to figure out why my thing wasn't rotating properly ... its was, just not very fast at all. Once I bumped that up it worked fine.

  • @jajwarehouse1
    @jajwarehouse1 5 ปีที่แล้ว +14

    I often see questions from people about why their characters are jittering when on the ground, or why triggers do not register when objects pass through, and I usually find in their code that they are moving the objects or characters with Transform.Translate which effectively bypasses the physics system with teleportation. They often think that as long as they do these types of movements in FixedUpdate, then it should not be an issue. Too often I see coders spending lots of time trying to recreate systems that the engine already does very well. The gravity system is a large source of confusion for newer coders, in this regard.

    • @noreasonchannel4012
      @noreasonchannel4012 5 ปีที่แล้ว

      True! Do you have more tips so we can learn too? let me contact you on twitter or instagram if you got a list please. I often find myself confused as to what movement systems to use like translate or rb.vel forward and what not

  • @trshpizza
    @trshpizza ปีที่แล้ว

    All we want to say is "Thank you, Jason." as this is an alternative to the source engine in our eyes.

    • @trshpizza
      @trshpizza ปีที่แล้ว

      And we might actually compare it to Source, Source 2, Unreal Engine Chaos, and definitely not ROBLOX, as it's just a garbage game engine with a blocky art style on a $5 budget.

  • @Livingdeadghost
    @Livingdeadghost 4 ปีที่แล้ว

    Liked keyboard shortcut, then you started showing off Rider IDE Shortcuts. Lovely. As always, thanks for sharing the insights and things we might find useful :)

  • @jipo50
    @jipo50 10 หลายเดือนก่อน

    Thank you for the tutorial, this really got me. keep making other tutorials to help those who are still beginners and need knowledge in using unity like me XD

  • @russellthorburn9297
    @russellthorburn9297 5 ปีที่แล้ว +1

    Nice video again Jason. I like that you have a good mix of beginner all the way through to advanced videos (something for everyone).

  • @juleswombat5309
    @juleswombat5309 2 ปีที่แล้ว

    Excellent very Helpful.
    Life would be a lot simpler without any Physics

  • @dairyfreelemonstreams9493
    @dairyfreelemonstreams9493 3 ปีที่แล้ว +2

    Very simple helpful and straight to the point.
    Thanks! This is a good introduction to all the physics stuff I plan on learning.

  • @SteadyPaceVince
    @SteadyPaceVince 2 ปีที่แล้ว

    Finally, now I understood what was the problem in my game

  • @mohandurai3002
    @mohandurai3002 3 ปีที่แล้ว

    Excellent tutorial sir.. I am following all your videos. Thank you very much.

  • @AlvosTiger
    @AlvosTiger 3 ปีที่แล้ว +1

    "Share the video, it helps more than anything else you can do"
    Wow... you really motivate people to do nothing else

  • @Spherous
    @Spherous 5 ปีที่แล้ว +1

    I think something important to note that changed in 2019.3 due to an NVIDIA PhysX update is that trigger vs trigger colliders do not throw trigger callbacks to each other anymore. Other than that, great tutorial :) good job!

    • @SteveTheExploiter
      @SteveTheExploiter 5 ปีที่แล้ว

      Thank you for pointing that out. I am curious how other people will solve this issue. I have my ideas, but, I am not sure if it is correct.

    • @Spherous
      @Spherous 5 ปีที่แล้ว +1

      @@SteveTheExploiter a child game object that isn't is trigger on a layer that can only collide with the istrigger layer

    • @SteveTheExploiter
      @SteveTheExploiter 5 ปีที่แล้ว

      @@Spherous That's how I've been doing it. Great!

  • @Livingdeadghost
    @Livingdeadghost 4 ปีที่แล้ว

    Loved the CTRL+SHIFT+F Shortcut for moving to Camera position shortcut, thanks. I'm here to learn more about using Physics and worried about physics and performance if I'm doing things wrong. Love your content. Hoping to delve more deeply into the massive world of "Destruction". Starting with C# Algorithms looping through mesh verts... Slooooow. Maybe through Voxels and on to Geometry Shaders.

  • @Rage-wg8qi
    @Rage-wg8qi 3 ปีที่แล้ว

    Thank you so much!! I have been struggling with this things since i got into Unity, you really helped me a lot

  • @ГерманФрелов
    @ГерманФрелов 4 ปีที่แล้ว

    Nice tutorial about basics of physics system

  • @WSMGameStudio
    @WSMGameStudio 5 ปีที่แล้ว +3

    Hi Jason,
    Could you please make a video on PhysX limitations and best practices to avoid strange physics behaviour in Unity?
    I'm especially interested in the effects of the PhysX limitations on Unity joints. There is a lot of issues related to joints acting strange due to PhysX not being able to handle heavy objects with children connected using joints.
    Best regards

  • @syio1
    @syio1 2 ปีที่แล้ว

    you brought me back to the counter strike days when you said "God Mode" lol, classic

  • @Transcriptor
    @Transcriptor 3 ปีที่แล้ว

    Thank you for showing us things that work, a refreshing change. Good job Jason, Merry Xmas and a Happy 2021 🎅🎄🌟✨🔔⛄️👏👏👏

  • @SoldatDuChristChannel
    @SoldatDuChristChannel 3 ปีที่แล้ว

    even though i just downloaded Unity, this tutorial helped bunches!

  • @AllenAwad
    @AllenAwad ปีที่แล้ว

    Very well explained. Thanks!

  • @josekarnikowski1711
    @josekarnikowski1711 3 ปีที่แล้ว

    Really nice video! Congrats!

  • @Case-A-Lace
    @Case-A-Lace 3 ปีที่แล้ว

    I've learned alot from this video! Thanks!

  • @talhaahmed6432
    @talhaahmed6432 3 ปีที่แล้ว

    I just started unity and it is very confusing for me, but this video help with these stuff,Thanks

  • @durgam_sumerian7815
    @durgam_sumerian7815 4 ปีที่แล้ว

    Thank you very much for your efforts and awesome tutorial.

  • @gavincooper1731
    @gavincooper1731 5 ปีที่แล้ว

    Thanks for another great video! You are the man!

  • @HirenMistryhirenhcm
    @HirenMistryhirenhcm 3 ปีที่แล้ว +1

    In the tile script. Where did you bind the A & D key in the script for the floor?
    BTW, great tutorial. 👍

    • @redi8229
      @redi8229 3 ปีที่แล้ว +2

      by default Input.GetAxis uses WASD, so the Input.GetAxis("Horizontal") automatically returns -1 or 1 with A & D

  • @공대아름이-n2e
    @공대아름이-n2e 2 ปีที่แล้ว

    Thanks for the good explanation. It helps a lot.
    잘 보고 가용~~~ ㅎㅎㅎ

  • @artsylowtekk2502
    @artsylowtekk2502 ปีที่แล้ว

    France this video is awesome.

  • @baconchaney
    @baconchaney 5 ปีที่แล้ว +2

    Hi Jason, massive thank you for these kind of videos, they are a massive help when getting my head around the engine. It's actually reminded me of a question that's been bugging me for a while. I'm trying to create a 2.5D type platformer but having a real problem getting my head around locking the movement to only two axis with the correct kind of physics to allow proper collisions with platforms etc. Can you suggest any good resources?
    (also, I agree with the comment about your shirt and your chair. You look like a floating head!).

  • @sebastianbryant4216
    @sebastianbryant4216 2 ปีที่แล้ว

    Very helpful, thanks!

  • @nicolenew1708
    @nicolenew1708 ปีที่แล้ว +1

    AMAZING

  • @realitycheck1018
    @realitycheck1018 4 ปีที่แล้ว +1

    Many thx for this tutorial, Jason. I am very new, and this helped me a lot. I mean, a lot.
    That being said, I was trying to use this ChangeColorOnCollision script to have a surface (the same cube you used in the examples) change color when Ellen contacted it (ran it into it, or jumped on it). The player "Ellen" I refer to is the character in the Unity 3D game kit. And it does not work. I tried adding a rigidbody to Ellen (had to make her kinematic/else fall through floor) and a mesh collider, but still no avail.
    Also, I'm not sure if this is part of an update, from 2019.3 to 2019.3.6, which I am using, or maybe you forgot, but I had to change the "layer" of the gameObjects to "collider" for any of it to work. or, Did I miss something there?
    If you have time, could you please explain to me how to make the character cause this changeColor via collision?
    Many thx,
    Wannabee Dev 101

  • @TechwithLaughter
    @TechwithLaughter 4 ปีที่แล้ว +3

    16:35 Trigger vs Collisions

  • @sompomdev3823
    @sompomdev3823 5 ปีที่แล้ว

    Thank your very much for your Tutorial.

  • @tigranminasyan658
    @tigranminasyan658 3 ปีที่แล้ว

    I see Jesse Schell's book of lenses in background :)

  • @lochvast1180
    @lochvast1180 ปีที่แล้ว +1

    So the Rigidbody tells the object how to move, and the collider defines the physical boundary of the object

  • @Work-ht2mr
    @Work-ht2mr 3 ปีที่แล้ว

    great vid, thanks

  • @bernhagen93
    @bernhagen93 3 ปีที่แล้ว

    super helpful thanks a lot

  • @mikebely8663
    @mikebely8663 5 ปีที่แล้ว +1

    Is there tutorial on how to push objects around the scene with players rigid body. Also need one to interact with virtual computer (switch from player camera to static on screen and back). TY

  • @dariuspranskus
    @dariuspranskus 5 ปีที่แล้ว +1

    Hi Jason. Thanks for all the videos you brought to the game developer community. Really really helpful. May I ask you to consider to create a video/series on anti-cheating. In particular I have an interest in creating a puzzle game with a back-end service. All my user data and achievements I would like to have in the back end. So I would like to know what techniques high level are available to me to ensure that the user has actually completed the level. What I am thinking is some business logic, which checks the sequence, timing of the requests hitting the back end service, but really would like some advise from the professional with experience. Manny thanks.

  • @samirisgood5735
    @samirisgood5735 ปีที่แล้ว

    Thank You!

  • @kenhetkonijn
    @kenhetkonijn 5 ปีที่แล้ว

    thanks for this video it is really awesome

  • @sebastiendube9487
    @sebastiendube9487 3 ปีที่แล้ว

    Hey there, how would you face the following problem :
    You have a sphere which represent a tennis ball
    You want the physic of the ball to be pretty realistic without having to implement complex laws of physics.

  • @JeffreyThrash
    @JeffreyThrash 4 ปีที่แล้ว

    Great tutorial. I've seen in fighting games, shooters and other competitive games that you can apply collision shapes to each individual limb of a character and have each of them react differently depending on where it's hit (the most obvious example being headshots). Is there a way to parent collision shapes like cubes and capsules to a specific bone on the character's rig or is it more complicated than that? I know having too many collision checks and triggers could drastically slow down the game if I overdo it, but, you know, in case the need arises...

  • @zoldlen883
    @zoldlen883 4 ปีที่แล้ว

    Good video.

  • @marafree4769
    @marafree4769 2 ปีที่แล้ว +1

    Why did super collider go on + off recently?

  • @simeonbeckford-tongs9391
    @simeonbeckford-tongs9391 ปีที่แล้ว

    Thank you

  • @אתהסתוםבלוםבצבעחום
    @אתהסתוםבלוםבצבעחום 4 ปีที่แล้ว +1

    So I set it up exactly as you did but my mesh fell through the floor :/ idk why

  • @mrdankinator4782
    @mrdankinator4782 3 ปีที่แล้ว

    Jason! Why'd u use Awake() instead of Start()?? Is it better?

  • @simpson6700
    @simpson6700 4 ปีที่แล้ว

    So, get component is an expensive call? Whenever i make projectiles i get a reference to other. GetComponent() and subtract the damage from other.Status.health and destroy my projectile, is there a better way to go about this? Sure for a bullet hell shooter it would be better to let the enemies check if they've been hit, but this approach seems awkward for games where the player only occasionally shoots an arrow.

  • @aimesolomon
    @aimesolomon 3 ปีที่แล้ว

    subscribed

  • @HarunAlHaschisch
    @HarunAlHaschisch 4 ปีที่แล้ว

    I don't understand why the balls jump higher and higher with a bounciness of 1 and no friction when the bounce combine is on maximum and bounciness drops quickly when bounce combine is on average. I just want an eternally bouncy ball, not one that bounces out of control. What do I need to do?

  • @avi6961
    @avi6961 4 ปีที่แล้ว

    On my player, I have a character Controller, animator, and player script and on the obstacle, I have a box collider and the script. When my player tries to jump close to the obstacle and hit the box collider, the player files of the game in the y-direction. When the player jumps from afar from the obstacle then nothing abnormal happens. Do you know what can be the reason for this? I am using on triggerEnter.

  • @SoumyajitSarkar
    @SoumyajitSarkar 3 ปีที่แล้ว

    So good

  • @xatazch
    @xatazch 5 ปีที่แล้ว

    Grate video. What abort a video like this but for animations :)

  • @TheNei
    @TheNei 5 ปีที่แล้ว

    Nice!! I will try today...
    Jason, can you some day create a tutor using MULTIPLES BALLS COLLISIONS in Unity?
    i search about on TH-cam but no find nothing about...
    Thanks!!

    • @gregoryfenn1462
      @gregoryfenn1462 5 ปีที่แล้ว

      What are you confused about? You just have several balls all with their own colliders?

  • @gsus7125original
    @gsus7125original 4 ปีที่แล้ว +1

    Jason, is it okay to use a CharacterController instead of a Rigidbody in big game projects?

    • @davidscutar1403
      @davidscutar1403 4 ปีที่แล้ว

      wdym by big game projects? they are 2 valid ways to do two different related things.

  • @sathvikmalgikar2842
    @sathvikmalgikar2842 2 ปีที่แล้ว

    Thank you sir

  • @nnovinho
    @nnovinho 4 ปีที่แล้ว

    great video man ! did some one told you that you look like dan harmon?

  • @Whoisin3
    @Whoisin3 2 ปีที่แล้ว

    What code editor is being used? Love the tutorial!

  • @BrendanHasAbs
    @BrendanHasAbs 3 ปีที่แล้ว

    Thanks!!!

  • @nikithebgfail8816
    @nikithebgfail8816 3 ปีที่แล้ว +1

    I'm trying to make good rigidbody movement ...... for me the best is with rb.velosity ..... but you are professional so if you think something about rigidbody movement 😉 🤔

  • @SonictheHedgehogInRealLife
    @SonictheHedgehogInRealLife 2 ปีที่แล้ว

    why does my player with a rigid body slightly clip through the ground when it lands

  • @loya5377
    @loya5377 3 ปีที่แล้ว

    Hi! Someone help me please! How can I determine the coordinates of the vertices of the Box Collider? If the object's rotation is not (0, 0, 0), then collider.bounds doesn't help.

  • @dragonninja9908
    @dragonninja9908 ปีที่แล้ว

    Thx duude

  • @chickennugget8158
    @chickennugget8158 3 ปีที่แล้ว

    how do I have a collider on an object that isnt a cube, sphere, cylinder, etc. (I'm using a chair) and I know I could just make the collider a cube for the chair, but how do I get an exact collider for the object?

    • @fishy1316
      @fishy1316 3 ปีที่แล้ว

      mesh collider

  • @bigmike1432
    @bigmike1432 3 ปีที่แล้ว

    how do you add angular gravity for wall running

  • @abhilashmukherjee9536
    @abhilashmukherjee9536 3 ปีที่แล้ว

    thank u

  • @swarupfule3557
    @swarupfule3557 4 ปีที่แล้ว

    Bro.i want to create roulette wheel and ball.but when roulette object rotate ball go out.what to do?

  • @robertosapucaia1108
    @robertosapucaia1108 5 ปีที่แล้ว

    You are awesome

  • @Gius7979
    @Gius7979 4 ปีที่แล้ว

    is there a plugin for VS editor which shows inline parameter hints as Rider do?

  • @OvernightOats1
    @OvernightOats1 3 ปีที่แล้ว

    Does this apply to vr? I keep falling through floor

  • @mracipayam
    @mracipayam 2 ปีที่แล้ว

    My man writing codes on light theme

  • @romulino
    @romulino 5 ปีที่แล้ว

    if I want everything to fall faster, is increasing the gravity value the right thing to do? Seems very weird, but I find the default fall speed to be very slow for my game. (drag already set to 0)

    • @essamsalah829
      @essamsalah829 4 ปีที่แล้ว

      increase the weight of the rigig body component

  • @jeremytan1051
    @jeremytan1051 3 ปีที่แล้ว

    if unity is the force, you are a luke skywalker. Thanks

  • @INeatFreak
    @INeatFreak 5 ปีที่แล้ว +1

    Hey. I am making top down shooter for mobile and i have problem with making projectiles. I tryed using rigidbody continuous dynamic collision detection but this didn't detect hits when bullet goes faster. Also tryed raycasting between last and current position for detecting collisions but this method is really performance heavy. So can you help me with dome ideas ? How can i make mobile friendly accurate bullets.? Thanks.

    • @Unity3dCollege
      @Unity3dCollege  5 ปีที่แล้ว +1

      how far and fast are the bullets going? normally with bullet type shots I don't even spawn projectiles and just use raycasts, but it depends a lot on the game. Are the things they're hitting extremely small too btw? Any extra info you can give will hopefully help us get you going in the right direction and get it resolved :)

    • @INeatFreak
      @INeatFreak 5 ปีที่แล้ว

      @@Unity3dCollege bullets should only go for 30-50 meters. I can use raycasting but its instant and i wanna have a bullet traces so that's why i am trying make it physical. And i want them to go slow enough that player can see where his bullets are going.

    • @MrTenergy01
      @MrTenergy01 5 ปีที่แล้ว

      If your bullets are slow enough to be clearly seen by your player then they are definitively not fast enough to go through an object without detecting it in continuous dynamic mode. Are the layers of your objects colliding with each other ?

    • @INeatFreak
      @INeatFreak 5 ปีที่แล้ว

      @@MrTenergy01 i know and that's the problem i am facing. and yes i've setup layers and tags correctly

    • @INeatFreak
      @INeatFreak 5 ปีที่แล้ว

      does collider trigger matters? i am checking for OnTriggerEnter on my code and bullet's collider is set to trigger.(i've read on forums that it's faster so that's why)

  • @FinitiXgameDepartment
    @FinitiXgameDepartment 5 ปีที่แล้ว +1

    Dots physics too?

  • @digitalconsciousness
    @digitalconsciousness 3 ปีที่แล้ว

    huh, attaching a rigid body doesn't appear to provide any sort of gravity for me, no matter the type of object I create. You don't appear to have any script attached to your sphere. Maybe they updated this? Not that it's any problem to write gravity code, but I did spend some time trying to recreate exactly what you did and could not.

    • @juleswombat5309
      @juleswombat5309 2 ปีที่แล้ว

      Did you Check that Gravity=True set on the Rigid Body component? It normally defaults to True, and as such no additional Script is required for it to fall. Unless you had also Kinematic checked as well. Typically I would either have Gravity = True + Kinematic = False, for typical physics OR I would have Gravity = False + Kinematics=True for when I want to remove the impact of physics.

  • @trashyy1630
    @trashyy1630 3 ปีที่แล้ว

    :c i'm not getting a red line when i attach the debug to the Sphere

    • @trashyy1630
      @trashyy1630 3 ปีที่แล้ว

      oh lol, i needed to rotate the ball

  • @cyboticIndustries
    @cyboticIndustries 5 ปีที่แล้ว

    Hey JAson - Great content - each and every time.. keep on doin what youre doing... but one odd request - Please *wear a shirt different colour from the chair* - I cant un-see your flying head !

    • @tambling3961
      @tambling3961 4 ปีที่แล้ว

      Is this a 1st world problem?

  • @Maggiethegsd
    @Maggiethegsd 4 ปีที่แล้ว

    Does this man ever smile

  • @Subrata157
    @Subrata157 3 ปีที่แล้ว

    Make a video about full Android fps/tps multiplayer game

  • @JCElzinga
    @JCElzinga 2 ปีที่แล้ว

    I got a rigidbody here for ya har har har

  • @nicobrits2019
    @nicobrits2019 4 ปีที่แล้ว

    It's videos like these that makes me want to give up before I start!
    (As a newbie)I typed all the code as per the video and in the very first piece of code I get 2 errors! I don't understand them and cannot fix them.
    Below is my code and the error reported on the console. (Remember I am a beginner and this video is aimed at beginners....right?
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class ChangeColorOnCollision : MonoBehaviour
    {
    private void OnCollisionEnter(Collision collision)
    {
    Color randomlySelectedColor = GetRandomColor();
    GetComponent().material.color = randomlySelectedColor;
    }
    private void GetRandomColor()
    {
    return new Color(
    r: UnityEngine.Random.Range(0f, 1f),
    g: UnityEngine.Random.Range(0f, 1f),
    b: UnityEngine.Random.Range(0f, 1f));
    }
    }
    ChangeColorOnCollision.cs(16,9): error CS0127: Since 'ChangeColorOnCollision.GetRandomColor()' returns void, a return keyword must not be followed by an object expression
    Will you tell me what is wrong please??

    • @nicobrits2019
      @nicobrits2019 4 ปีที่แล้ว

      And: Cannot implicitly convert type 'void' to 'UnityEngine.Color'

    • @zerrkoo5993
      @zerrkoo5993 4 ปีที่แล้ว

      @@nicobrits2019 Hello Nico , The problem is that Your " Private Void GetRandomColor() " is a void method so it is returning nothing to your " randomlySelectedColor " variable in order to make a function or method return a result you need to replace void with what you would like to return for Example :
      Your code -->
      private void GetRandomColor()
      {
      return new Color(
      r: UnityEngine.Random.Range(0f, 1f),
      g: UnityEngine.Random.Range(0f, 1f),
      b: UnityEngine.Random.Range(0f, 1f));
      }
      Working code ---->
      private Color GetRandomColor()
      {
      return new Color(
      r: UnityEngine.Random.Range(0f, 1f),
      g: UnityEngine.Random.Range(0f, 1f),
      b: UnityEngine.Random.Range(0f, 1f));
      }
      I am new to coding to but i hope this helps :)

  • @gregoryfenn1462
    @gregoryfenn1462 5 ปีที่แล้ว

    How do we define collisions and kinematic motion and physic-materials in Unity ECS? Or do we have to have a hybrid system where some of the game physics uses old MonoBehaviours?

  • @cargorunner9960
    @cargorunner9960 ปีที่แล้ว +1

    I find Unity very inconsistent and difficult to understand. If I create the ground as a plane which comes with a mesh collider attached. The ball falls straight through the floor. If I create the ground as a cube which comes with a box collider the ball will stop falling when it hits the cube. Why does the mesh collider not stop the ball falling? I have to manually add a box collider to the plane to get the ball to stop falling.
    I also swapped the ball for a tall rectangle. The rectangle fell straight down and then bounced perfectly straight back up. This looked totally unatural. In real life the tall rectangle would fall over. So I guess I have to use a script to make the bounce more random and natural

    • @Mayawayya
      @Mayawayya ปีที่แล้ว

      I used a plane and i worked just fine

    • @cargorunner9960
      @cargorunner9960 ปีที่แล้ว +1

      @@Mayawayya I am using 2022.2.5f1 I should have mentioned that. Different Unity versions can act differently

    • @Mayawayya
      @Mayawayya ปีที่แล้ว

      @@cargorunner9960 oh that makes sense I'm using a version from 2019

  • @nocultist7050
    @nocultist7050 3 ปีที่แล้ว

    I struggle to make friction based movement, like in real life.

  • @dhruvgupta8172
    @dhruvgupta8172 4 วันที่ผ่านมา

    share the files pls

  • @charlieskarts1934
    @charlieskarts1934 4 ปีที่แล้ว

    26:25

  • @samljer
    @samljer 4 ปีที่แล้ว

    I still remember trying to explain to someone why making the jump of a character physics based was better then 4 hours of coding it in., lol. why reinvent the wheel.

  • @flensim7536
    @flensim7536 4 ปีที่แล้ว

    привет
    *привет*
    -привет-
    _привет_