C
C#2w ago
efeessiz

unity character clips into floor and cant walk properly

unity character clips into floor and cant walk properly
24 Replies
SamwiseTheBrave
provide more context, please
efeessiz
efeessiz2w ago
k one min
efeessiz
efeessiz2w ago
efeessiz
efeessiz2w ago
@WinForms Sam
SamwiseTheBrave
can you show movement code?
efeessiz
efeessiz2w ago
No description
efeessiz
efeessiz2w ago
it isnt clear right
SamwiseTheBrave
can you paste it?
efeessiz
efeessiz2w ago
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
SamwiseTheBrave
this looks alr what are you using for collision detection?
efeessiz
efeessiz2w ago
the problem is the character clippng into walls
SamwiseTheBrave
he's just going through them
efeessiz
efeessiz2w ago
yeah wait lemme chec k
SamwiseTheBrave
seems like you don't have any collisions
efeessiz
efeessiz2w ago
how do i add if i dont have any
SamwiseTheBrave
are you following some tutorial?
efeessiz
efeessiz2w ago
no
SamwiseTheBrave
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 ·····················...
SamwiseTheBrave
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
efeessiz
efeessiz2w ago
so you dont know how to add collision?
SamwiseTheBrave
I would have to open up my unity editor and try
efeessiz
efeessiz2w ago
oh k
SamwiseTheBrave
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
efeessiz
efeessiz2w ago
alr thank you
Want results from more Discord servers?
Add your server