Тёмный

28 Creating a Ladder in Unity 

Jordan Dubreuil
Подписаться 261
Просмотров 3,5 тыс.
50% 1

Опубликовано:

 

29 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@plekiko5180
@plekiko5180 3 года назад
It Works Like a Charm! Here ya go the code. using System.Collections; using System.Collections.Generic; using UnityEngine; public class LadderScript : MonoBehaviour { public Transform playerController; bool InsideLadder; public float LadderHeight = 3.3f; public PlayerMovement playerInput; void Start() { playerInput = GetComponent(); InsideLadder = false; } private void OnTriggerEnter(Collider col) { if(col.gameObject.tag == "Ladder") { playerInput.enabled = false; InsideLadder = !InsideLadder; } } private void OnTriggerExit(Collider col) { if(col.gameObject.tag == "Ladder") { playerInput.enabled = true; InsideLadder = !InsideLadder; } } void Update() { if(InsideLadder && Input.GetKey("w")) { playerController.transform.position += Vector3.up/LadderHeight; } } }
@TV-po9ho
@TV-po9ho 3 года назад
THANK!!
@wafeeeel5563
@wafeeeel5563 4 года назад
Thank you for this tutorial!
@SkyLeon-iu3ee
@SkyLeon-iu3ee 3 года назад
exactly what i did in my script...Only,my character sort of jitters at the top of ladder.Not sure how to fix it.But if i don't let go W key,all is fine.How about jumping from ladder to ladder,or from wall to wall?Would be interesting for some kind of adventure/action platformer(2.5D side scroller)
@henryrobersonn
@henryrobersonn 4 года назад
wow this worked great, thanks!
@funkyfun3463
@funkyfun3463 2 года назад
I have a problem that the when the player touches the ladder it becomes infinite like neverending ladder. I know where the problem is but I dont know ho to fix it. In ontriggerenter it is turning off his collider and the there is nothing to check that the player is out
@jordancash80
@jordancash80 2 года назад
Not sure why the collider would be disabled while in the ladder trigger. I don't believe any of the code disables the players collider. Maybe try checking the ladder height to be sure the player exits the trigger.
@lazikbro12
@lazikbro12 Год назад
my character stays on ladder and cant exit it and press s doesnt work
@isabellamorris6222
@isabellamorris6222 3 года назад
Hi, this is really good but my player is getting stuck going up the ladder for some reason. Didn't know if you ever experienced this issue with ladders before.
@sandeepanchoudhury-8j-164
@sandeepanchoudhury-8j-164 3 года назад
make a platform and put it little bit above the ladder and place it behind then after getting up the ladder press w to climb up the platform. Hope this solves your problem. :)
@lazikbro12
@lazikbro12 Год назад
@@sandeepanchoudhury-8j-164 me. nope still
@yoyu7685
@yoyu7685 3 года назад
thank you so much
Далее
29 Creating a Keypad in Unity Part 1
31:53
Просмотров 582
МЖ. Может, папа - ты? 16.02.2023
40:03
Просмотров 113 тыс.
Voy shetga man aralashay | Million jamoasi
00:56
Просмотров 412 тыс.
26 Using Lerps to make NavMeshAgent Jump
14:13
AI Learns to Play Tag (and breaks the game)
10:29
Просмотров 4,1 млн
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 723 тыс.
HOW TO MAKE 2D LADDERS IN UNITY - EASY TUTORIAL
8:01
AI Boxing Got me Wheezing
15:06
Просмотров 370 тыс.
MELEE COMBAT in Unity
21:07
Просмотров 1,6 млн
Unity Hinge Joint
5:44
Просмотров 28 тыс.