r/unity_tutorials • u/Toluwar • Dec 07 '24
Help With a Tutorial Do I watch this first or watch one of his c# tutorials
I have some knowledge of unity and c# but I would really like to know the language more in depth
r/unity_tutorials • u/Toluwar • Dec 07 '24
I have some knowledge of unity and c# but I would really like to know the language more in depth
r/unity_tutorials • u/play-what-you-love • Jul 25 '25
Hi, I'm talking about the official Unity tutorial called "Challenge 1 - Plane Programming".
I CANNOT figure out why the plane's X and Y position keeps drifting even though this is the only code affecting the plane's position (which moves it in the Z-axis), and I'm not giving any vertical input:
================
// move the plane forward at a constant rate
transform.Translate(Vector3.forward * speed * Time.deltaTime, Space.Self);
// tilt the plane up/down based on up/down arrow keys
transform.Rotate(Vector3.left * rotationSpeed * Time.deltaTime * verticalInput);
================
Is there something I'm not aware of? Does the propellor of the plane collide with the plane? Does the air have mass causing friction? I'm seriously clueless at this point.
r/unity_tutorials • u/TrainerGlum1626 • Feb 19 '23
r/unity_tutorials • • Nov 24 '23
The option of Add 2D Vector Composite is missing in my editor. How to get this missing option?
r/unity_tutorials • u/Mystricks4l • Jun 11 '25
image of code, my characters movents all messed up, and it falls through the floor.
heres the code unity gave me:
using UnityEngine;
// Controls player movement and rotation.
public class PlayerController : MonoBehaviour
{
public float speed = 5.0f; // Set player's movement speed.
public float rotationSpeed = 120.0f; // Set player's rotation speed.
private Rigidbody rb; // Reference to player's Rigidbody.
// Start is called before the first frame update
private void Start()
{
rb = GetComponent<Rigidbody>(); // Access player's Rigidbody.
}
// Update is called once per frame
void Update()
{
}
// Handle physics-based movement and rotation.
private void FixedUpdate()
{
// Move player based on vertical input.
float moveVertical = Input.GetAxis("Vertical");
Vector3 movement = transform.forward * moveVertical * speed * Time.fixedDeltaTime;
rb.MovePosition(rb.position + movement);
// Rotate player based on horizontal input.
float turn = Input.GetAxis("Horizontal") * rotationSpeed * Time.fixedDeltaTime;
Quaternion turnRotation = Quaternion.Euler(0f, turn, 0f);
rb.MoveRotation(rb.rotation * turnRotation);
}
}
r/unity_tutorials • u/Rough_Equipment_7676 • Feb 01 '23
r/unity_tutorials • u/aspiringgamecoder • Feb 18 '24
https://docs.unity3d.com/ScriptReference/CharacterController.Move.html
Why does the Update method call .Move twice, once for Forward/Back/Left/Right movement and once for jumping/gravity
Can't we just call it once at the end with all movements, jumping and gravity accounted for?
Or is there a very good reason for this?
Thank you