What is a Transform (Unity Tutorial for Beginners - Position, Rotation, Scale, Vector3)

What is a Transform (Unity Tutorial for Beginners - Position, Rotation, Scale, Vector3)

Code Monkey

5 лет назад

96,576 Просмотров

✅ Unity Basics for Beginners Playlist: https://www.youtube.com/playlist?list=PLzDRvYVwl53vxdAPq8OznBAdjf0eeiipT
In this video we're going to learn what a Unity Transform is and what it's used for.
🌍 Get my Complete Courses! ✅ https://unitycodemonkey.com/courses
👍 Learn to make awesome games step-by-step from start to finish.

If you have any questions post them in the comments and I'll do my best to answer them.

🔔 Subscribe for more Unity Tutorials https://www.youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confirmation=1

See you next time!

📍 Support on Patreon https://www.patreon.com/unitycodemonkey
🤖 Join the Community Discord https://discord.gg/eHjUVrm
📦 Grab the Game Bundle at https://unitycodemonkey.com/gameBundle.php
📝 Get the Code Monkey Utilities at https://unitycodemonkey.com/utils.php

#unitytutorial #unity3d #unity2d

--------------------------------------------------------------------

Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.

I've been developing games for several years with 7 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.

You can see my games at www.endlessloopstudios.com


--------------------------------------------------------------------

- Website: https://unitycodemonkey.com/
- Twitter: https://twitter.com/UnityCodeMonkey
- Facebook: https://www.facebook.com/UnityCodeMonkey/

Тэги:

#unity_transform_tutorial #unity_transform_essentials #unity_transform #unity_transform_position #code_monkey #brackeys #unity_game #unity_game_tutorial #unity_tutorial_for_beginners #unity_2d_tutorial #unity_3d #unity_3d_tutorials #unity_basics #unity_tutorial_2d #unity_tutorial_for_beginners_2020 #unity_tutorial #unity_tutorial_for_beginners_2d #beginner #easy #unity3d #unity #basics #basic #game_development_unity #c# #programming #how_to #learn #tutorial #game #game_development
Ссылки и html тэги не поддерживаются


Комментарии:

WWE ŚHORTS
WWE ŚHORTS - 23.07.2023 13:14

Bro help me It dont login when i try😪😪😪😪😪😪😪😪😪😪😪😪😪

Ответить
SmellGrow!
SmellGrow! - 18.04.2023 01:20

thanks A lot your a real helper ❤❤❤

Ответить
Short Clips
Short Clips - 16.04.2023 12:13

awesome, Thank you .........

Ответить
RomanMines64
RomanMines64 - 11.11.2022 18:36

Hello I know this video is older and my question might not get answered, but I've noticed that since the transform function changes the position, scale, or rotation instantly. which could cause objects to just phase through it. but I want to transform an object the same way the inspector does it.

here is my problem, its not the exact situation but ill simplify it.
imagine a mesh collider wall that gets transformed to slide in a direction and what I want it to do is push on objects that it runs into and keep pushing them, just like how it would work if you just clicked on the X, Y, or Z values in the inspector and dragged them. but instead it just phases through all of the objects, even with a Lerp.
but If I were to transform using the inspector, it does work exactly how I want it to.

for the real situation that I am suffering through, I have a bunch of free floating "particles" or just spheres inside of a giant sphere, the big sphere has inverted normals so that the walls of the collider face the inside, not allowing anything to escape the inside of the sphere. I want to be able to scale the sphere up and down so that the particles inside of it would be forced to go to the center of the sphere, but I dont really want to add a force to the particles because every one of them already have a bunch of force calculations so they can attract and repel from each other

Ответить
GENERAL ZEETEN
GENERAL ZEETEN - 31.10.2022 12:01

nice job bro

Ответить
Jason Ellingsworth
Jason Ellingsworth - 18.09.2022 14:05

Way too brief. It would be much more useful if you went in to detail of coding examples and explanations. Very hard to find something like this for transform. Everyone is doing this with multiplying the values/variables together and it doesn't make any sense to me why what is written in the code is changing what is happening on the screen.

Ответить
Aaron
Aaron - 31.08.2022 12:46

I thought I was gonna know all this already and I still learned something!

Ответить
leksetengah gada
leksetengah gada - 12.07.2022 13:22

why vector3? not vector2?

Ответить
Ben Thompson
Ben Thompson - 27.06.2022 16:15

Hey, I know this is a bit old, but I had a question while I was watching the video.
When you use the code to manipulate the rotation, the child object rotates around the parent object, treating the parent’s pivot like its own pivot.
Is there a way to keep the parent-child relation, but prevent the child from rotating around the parent? That way they could still move in the line together, but just rotate in their own circles, rather than make one big one?

Ответить
Soorena Asl
Soorena Asl - 06.06.2022 13:10

hello every body, i have a question in my mind for a long time and i will ask it here.

what is difference between get the transform from a GameObject variable or Transform variable?
i know you cant get a transform from GameObjects so why should i use Transform?

Ответить
Change Ahead
Change Ahead - 29.04.2022 09:43

I have a question. There is a unit, the rotate character engine. I want to control this with keys, for example, when it is stationary, it returns when the key is pressed. GetKey commands don't work by the way.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Rotate : MonoBehaviour
{

public float RotationSpeed = 1f;

private void Start()
{

}
void Update()
{
if (Input.GetKey(KeyCode.I))

transform.Rotate(new Vector3(0f, 1f, 0f).normalized * RotationSpeed * Time.deltaTime);

if (Input.GetKey(KeyCode.K))

transform.Rotate(new Vector3(0f, 0f, 0f).normalized * RotationSpeed * Time.deltaTime);
}
}

Ответить
neoZoidY
neoZoidY - 15.02.2022 08:20

as always awesome

Ответить
Pitfulll
Pitfulll - 05.02.2022 18:59

Thanks for the tutorial! Do you know if there's a way to change the movement direction based on a changing direction? I have a arrow gun that rotates to face my player but I have no idea how to make the arrows that shoot out shoot in the direction of my player if that makes any sense 😅

Ответить
Fiery Ninja
Fiery Ninja - 16.12.2021 05:08

very useful

Ответить
lfrohling
lfrohling - 15.09.2021 08:34

Nice!

Ответить
MrMelon27
MrMelon27 - 02.09.2021 13:57

Thank you this helped a lot!!

Ответить
kiPRO BRos
kiPRO BRos - 18.08.2021 22:10

Excelent, thank you.

Ответить
Asmod
Asmod - 05.07.2021 00:47

Crystal clear.

Ответить
polihayse
polihayse - 21.06.2021 00:24

eulerAngles is pronounced "oiler angles" just FYI. Thanks for the great tutorials.

Ответить
CT Luwua
CT Luwua - 20.05.2021 13:32

Can we make games in unity without using c#

Ответить
CT Luwua
CT Luwua - 20.05.2021 13:31

IS it important to use or learn c# to make games like this ??

Ответить
Taranpreet Singh
Taranpreet Singh - 12.05.2021 10:23

Thanks for the video

Ответить
Varshith Paturi
Varshith Paturi - 06.04.2021 07:00

CAN YOU MAKE THESE GAMES ON SCRATCH

Ответить
kadir Sivas
kadir Sivas - 27.01.2021 05:09

How can u make a reference to the child of the parent without using the name of the gameobj

Ответить
Kristian Hristakiev
Kristian Hristakiev - 22.12.2020 13:37

Thanks!
I just want to ask how do you get these tips for the code from Visual Studio. Mine doesn't work with the Unity commands such as transform or Time.time etc.
Any help?

Ответить
Mitch Iarikov
Mitch Iarikov - 17.12.2020 22:59

Pronounced 'Oiler' not 'You-ler'

Ответить
idiot dev
idiot dev - 23.11.2020 08:58

Someone help me
List<Transform> targets

How to find this targets with tag...

Ответить
Notifications Off For Replies
Notifications Off For Replies - 04.09.2020 08:39

Hello and welcome, to code monkey, the guy who explains at his own pace and doesn't bother to have empathy for his viewer's pace.

Ответить
Abraham Liz
Abraham Liz - 20.07.2020 19:34

Your channel is exactly what I needed! Thank you for this

Ответить
Sa1ve_Studio Yarmukhametov
Sa1ve_Studio Yarmukhametov - 29.06.2020 10:40

Awesome videos!!!
Thank you:)

Ответить
Edmund Weir
Edmund Weir - 27.06.2020 07:29

Love your work, mate! Thanks for opening the doors to Unity for many of us :)

Ответить
BSi - Blakk Series initiative
BSi - Blakk Series initiative - 04.06.2020 23:07

Im struggling to make the child gameobject occupy the position of the parent object. I'm attempting to make one gameobject switch with another gameobject, but occupy the position of the previous gameobject. What do u do?

This is in 3D btw.

Ответить
Eric L
Eric L - 06.05.2020 07:23

How do you move a transformer of your object only one time without it moving every frame and without using the void start?

Ответить
Frank Ensminger
Frank Ensminger - 23.04.2020 04:14

do you have to have like notepad+ in order to write scripts? or is it a setting thing? i started with a tutorial so i dont know if i need to "take off" the training wheels?

Ответить
Giorgio Guglielmone
Giorgio Guglielmone - 20.04.2020 22:29

In the final part of your tutorial, you don't see any difference in value between "Debug.Log (childTransform.localPosition);" and "Debug.Log (childTransform.position);" why ?

Ответить
Giorgio Guglielmone
Giorgio Guglielmone - 28.03.2020 20:43

In the tutorial do you use a figure (sprite) where can I find it?

Ответить
Abdalla Ayman
Abdalla Ayman - 28.02.2020 19:01

you r the best
u really helped me

Ответить
Abdalla Ayman
Abdalla Ayman - 28.02.2020 19:00

thank you so much

Ответить
masoud qashqai
masoud qashqai - 23.02.2020 15:48

Code Monkey! , AWESOME JOB! Bravo!!, and may i say , Who Don't Wanna Learn By a Nerd Monkey??

Ответить
Hamptor
Hamptor - 23.01.2020 20:23

how do i make limits of scale

Ответить
Pira Ente
Pira Ente - 20.12.2019 12:22

The Unity Api says "you should only apply absolute values, not increment them" for the transform.eulerAngles.
Do I misunderstand the description, or is the shown example not recommended?

Ответить
Soul Hunter
Soul Hunter - 23.08.2019 00:06

Thank you ! You really helped me !

Ответить
Zel
Zel - 22.08.2019 03:45

Unity keeps throwing compiler errors at me and Visual Studio won't pick up any of the function calls. Transform and debug just aren't registering to it and I'm not sure why. I made sure my code was identical to yours. I'm missing something I guess, but I have no idea what.

Ответить
yuval gabay
yuval gabay - 01.08.2019 16:24

Whats is locel value (like whats us the difference)

Ответить
D. Ach
D. Ach - 28.07.2019 02:30

What is the point of using vector3 on a 2D game?

Ответить
Johnny Guillen
Johnny Guillen - 08.07.2019 17:58

How do i get an object to change from one form to another?

Ответить
Al GS
Al GS - 25.06.2019 18:03

Hello, I am brasilian and have you ever think to make a Portuguese channel for people that don’t understand English

Ответить