Quantcast
Channel: Questions in topic: "walk"
Viewing all articles
Browse latest Browse all 88

NEWBIE - how to make move like a mario brothers

$
0
0
Hello, I'm new. Can someone help me write a script that my character can pass through the edges of the screen? I write only script for teleport but i don;t need teleports. using UnityEngine; using System.Collections; public class teleport1 : MonoBehaviour { public Transform target; void OnTriggerEnter(Collider col){ if (col.tag == "Player"){ if (transform.position.x < 0) col.gameObject.transform.position = new Vector3(transform.position.x+2.6f, transform.position.y-0.15f); else col.gameObject.transform.position = new Vector3(transform.position.x-2.6f, transform.position.y-0.15f); } } } ![alt text][1] [1]: http://199.101.98.242/media/shots/56188-Mario_Bros._(World)-4.jpg I hope someone will help greetings

Viewing all articles
Browse latest Browse all 88

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>