Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

The position of my player always returns to (0, 0, 0)

$
0
0
Hey guys I’m having an issue with Unity. I already looked for an answer from someone else who may have had the same issue but I couldn’t find one. So basically here is what happens : I wrote a script to make my ball (Player) move always up and go on one side or the other using the left and right keys on the computer and it works perfectly fine but the problem is that I want my ball to have an original position of something like (-1.3, 0, 0) but when I hit play the ball returns to 0 on the x axis while going up and I can’t figure out why. I had kind of the same problem for my camera-following-player script but then I could resolve it just by setting the transform.position.x to 0, and can’t do that for player otherwise it won’t go right or left anymore. By the way there is no animation on the ball and I just have a character controller in addition to the script on the player. So please if anyone knows how to resolve that problem it would be great thanks :)

Viewing all articles
Browse latest Browse all 827

Trending Articles



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