unity character clips into floor and cant walk properly
unity character clips into floor and cant walk properly
24 Replies
provide more context, please
k one min
@WinForms Sam
can you show movement code?
it isnt clear right
can you paste it?
kk
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Movement : MonoBehaviour
{
public float speed = 10f;
// Update is called once per frame
private void Update()
{
float xHorizontal = Input.GetAxis("Horizontal");
float zVertical = Input.GetAxis("Vertical");
// Hareket vektörü (x, y, z) şeklinde oluşturuldu
Vector3 moveSystem = new Vector3(xHorizontal, 0.0f, zVertical);
// Nesneyi yeni pozisyona taşır
transform.position += moveSystem * speed * Time.deltaTime;
}
}
@WinForms Sam
if you need anything else i can send
this looks alr
what are you using for collision detection?
the problem is the character clippng into walls
he's just going through them
yeah
wait lemme chec
k
seems like you don't have any collisions
how do i add if i dont have any
are you following some tutorial?
no
https://www.youtube.com/watch?v=4HpC--2iowE&pp=ygUgYnJhY2tleXMgdGhpcmQgcGVyc29uIGNvbnRyb2xsZXI%3D
then maybe you should check out Brackey's awesome tutorial about 3rd person movement
Brackeys
YouTube
THIRD PERSON MOVEMENT in Unity
Let's learn how to make a solid third person controller with a moving camera!
Jason no longer offers the course mentioned in the video.
👕Get the new Brackeys Hoodie: https://lineofcode.io/
● Third person controller asset: https://assetstore.unity.com/packages/templates/systems/third-person-controller-126347?aid=1101lPGj
·····················...
he will explain it way better than I'd do
(my Unity skills got rusty after these years)
this covers controls, collisions and camera movement
so you dont know how to add collision?
I would have to open up my unity editor and try
oh k
I worked mainly with 2D
so most of my experience is about 2D stuff
which isn't very different from how 3D stuff works, but 3D has things like character controllers and such
again, if you want high quality advice, I'd recommend you to try once again asking in Unity server.
but honestly this tutorial should be enough
I learned most things about Unity just by watching Brackeys, it's a great resource
alr thank you