Tutorial How To Move Rotate and Control 3D Object With Arrow Keys in Unity Software Game

preview_player
Показать описание
In this video I show you a simple C# script that allows you to make a 3D game object move and rotate if you arrow keys. Up and Down keys are for move forward and backward. Left and Right keys are for rotate left and right. So you will be able to create some unity control feature. You press arrow keys on your keyboard and any game object with script attached will be able to move and rotate. Any character or player can be controlled using this simple technique.

TO BLAST! - My New Fun Relaxing Puzzle Game Available On Google Play Store

Guess The Movie Is Available On Play Market For Free For Android devices
Here is the link

If you like what I'm doing then you can support me through
or here

Or You Can Become A Sponsor Of My Channel And Get Access to Downloadable content such as project files (scripts, art, etc)

Thank you :-)
Рекомендации по теме
Комментарии
Автор

Не давно нашёл одно из ваших видео, и оно мне очень помогло. Я старался попробовать создать игру в двухмерном пространстве на Юнити, и никак не мог найти хороший способ это сделать. Все остальние объеснения работали над елементами которие мне были не нужны, а в вашем видео именно всё было очень подробно рассказано и могло подойти к любои 2Д игре. Я понимаю, что вы больше ютубом не занимаетесь, но все равно, желаю вам успеха во всех ваших делах. Спасибо!

UmbaranMilitia
Автор

Супер крутой и простой код, спасибо :)
Хорошо, что вы решили заняться движениями 3д-объектов вместо 2д. Они сложнее или проще, чем 2д?

YOURREST
Автор

Hi, Alexander. Why don't use Translate and Rotation inside Update method, instead of use them in LateUpdate? By the way, congratulations for the video

helciowagner
Автор

Mr.Alexdander where are u pls come back

orhangunes
Автор

Hi,
hope you are doing good,
Plz make a video on under water player movement
thanks

alirana
Автор

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

public class groundcontrol : MonoBehaviour
{
public float move = 0f;
public float moveSpeed = 0f;
public float rotation = 0f;
public float rotateSpeed = 0f;
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{
move = Input.GetAxis("Vertical") * moveSpeed * Time.deltaTime;
rotation = Input.GetAxis("Horizontal") * rotateSpeed * Time.deltaTime;
}

private void LateUpdate()
{
transform.Translate(0f, 0F, move);
transform.Rotate(0f, rotation, 0f);
}

}

emberdragons
Автор

Been 1 year already, the legend still didn't come back😢😥

VaneTheLocal
Автор

I'm impressed by your course and its potential impact! I'd love to collaborate on promoting it to a wider audience. Let's discuss how I can help spread the word effectively. Looking forward to your thoughts! Best regards.

KingBeyu
Автор

Great video, I would like to see how to make 2d player controller in which you rotate rigidbody and move rigidbody by the way it is facing

faris_diz
Автор

Good stuff 3D ! Yea!.. more 3D please 🙏

random_precision_software
Автор

When you coming back to make tutorials?

mikhailhumphries
Автор

hello, your example of a 2d tank with the movement of the tower separated from the tank was good, I would like to do the same in 3d to look like the game world of tanks, as the tower rotates it takes about 5 seconds to leave position A to B rotating slowly to simulate a real tank and the turret when aiming with the mouse it also takes time until the aim arrives is not automatic, how to do this?

walney
Автор

Александр, у вас супер крутые видео! Есть ли у вас в планах создать видео про добавление рекламы Unity Ads или Admob?

raksana
Автор

can you do one for a cylinder where the orgin point is at one end and it can move any direction 360. like a cannon

foreign-livingtheamericand
Автор

hi! i wanted you to teach me how to open door with a mouse click but not the button, just click the door and it will be open

TatsukiBaba
Автор

show, how do you shoot and aim like world of tanks?

walney
Автор

I used wasd and arrow keys to make 2 player it was veryyyy glitchy

aaliyaankhawaja
Автор

I need unity plugin tutoriel for 2d game.

johnraj
Автор

Привет, учился по твоим видео и они мне очень помогли. но в последнее время видео стали немного однообразными(типа игра другая, но суть того ка она сделана была уже в других твоих видео).Можешь сделать интересный урок по Events или как правильно делать пул объектов.

skywoker
Автор

hello, world warship game, when I press W the ship goes at constant speed forward, when I press S it reduces constant speed until it goes backwards, when I press A it turns left more slowly, when I press D it turns right slowly, how to do this in unity ? I love your videos, then learn how to create turrets with shots, ^^

walney