Unity Visual Scripting and C# | Boost Ramp + Antigravity Tube + Conveyor Belt

  Рет қаралды 1,431

Home Mech

Home Mech

Күн бұрын

Пікірлер: 5
@WildfireKitsune
@WildfireKitsune 3 жыл бұрын
I don't know if you have to save the component like that in the beginning. You could just use the Get Material and have it as 'This' without piping in your graph variable. Side note, if you don't use the Get Renderer and just work on the material, it'll do it for every one of those object in the scene. Using the Get Render makes the offset only work on that individual's specific material, and instantizes as specific one for that object, which is good :)
@HomeMech
@HomeMech 3 жыл бұрын
Great point! Yes, eventually we will "paint" the balls individually even though they all share the same material, like you are saying. We are also saving the component on Start because that way it matches the Unity C# documentation entry here: docs.unity3d.com/ScriptReference/Material.SetTextureOffset.html Now that user comments and notes are encouraged on the Unity documentation pages, I'm going to link a few of these videos there :D
@laurengoodwin7652
@laurengoodwin7652 2 жыл бұрын
Hi I just tried the anti gravity tube and it worked. But I need my spheres going in the y direction only. How would I do this ?
@HomeMech
@HomeMech 2 жыл бұрын
Great! So you're thinking something like a vacuum tube, right? Check out the Rigidbody component on the ball--look for "Constraints", there you can freeze the position. On Trigger Enter you get the Rigidbody, then you can use it to constrain the X and Z position. Search for "Rigidbody Set Constraints." You may need two nodes to set the X and then the Z. You might want to do this after a Wait unit (after the Set Velocity) so that the ball can travel a little bit into the collider. And, of course, you'll want to turn those constraints off On Trigger Exit. Another way to do it is to simply divide the X and Z by a number much greater than 3 and then on an On Trigger Stay move the ball, like the conveyor belt. On the conveyor we use Transform Get Forward, but you can create a Vector3 variable and put in your own value or use "Vector3 Get Up."
Should you use Unity 6 to develop your Game?
25:28
DarkDax
Рет қаралды 52 М.
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
9 Visual Scripting Mistakes Beginners Make in Unity
10:35
Home Mech
Рет қаралды 3,3 М.
Remake - Belt / Conveyor System Tutorial [Unity3D]
17:58
CodingWithRus
Рет қаралды 10 М.
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 7 МЛН
Coding Adventure: Atmosphere
22:00
Sebastian Lague
Рет қаралды 1,1 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН