that really helped a lot. i always got stuck at the edges. thx
@tauheedgamedev23884 жыл бұрын
Great Tutorial, Iv been more focused on strategy games so genuinely didn't know about platform effectors. 👍
@paulbuckley6854 жыл бұрын
Excellent tutorial 👌
@R1zzio3 жыл бұрын
Can you make a tutorial how to make enemies not fall from it? it would really help
@topsidestudios59473 жыл бұрын
Code for those not wanting to type it out : public class OneWayPlatform : MonoBehaviour { public bool coll; public PlatformEffector2D platform; void Update() { if(coll && Input.GetKeyDown(KeyCode.S)) { platform.surfaceArc = 0f; StartCoroutine(Wait()); } } private void OnCollisionEnter2D(Collision2D collision) { coll = true; } private void OnCollisionExit2D(Collision2D collision) { coll = false; } IEnumerator Wait() { yield return new WaitForSeconds(0.3f); platform.surfaceArc = 180f; } }
@timofeysamokhin99183 жыл бұрын
There are many things you leave out. if there is an enemy on the platform, or if the player does not move away, he will be pushed upward. Dislike
@topsidestudios59473 жыл бұрын
This was just suppose to be a quick beginners video to get a basic one way platform system working. The code can be expanded to cover the problems you stated but I wanted to keep the video short 👍