Quantcast
Channel: Questions in topic: "clone"
Viewing all articles
Browse latest Browse all 508

bullets fire (clone) wrong direction *2d

$
0
0
the (clone) bullets fire go to wrong direction and i use this code i am making a 2d game **using UnityEngine; /// Simply moves the current game object public class MoveScript : MonoBehaviour { // 1 - Designer variables /// Object speed public Vector2 speed = new Vector2(10, 10); /// Moving direction public Vector2 direction = new Vector2(0,1); private Vector2 movement; void Update() { // 2 - Movement movement = new Vector2( speed.x * direction.x, speed.y * direction.y); } void FixedUpdate() { // Apply movement to the rigidbody rigidbody2D.velocity = movement; } }**

Viewing all articles
Browse latest Browse all 508

Trending Articles



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