Why would instantiating a prefab cause my player to move slightly to the right?
I'm working my way through the Create with Code course (so I don't have a lot of Unity experience). In week 2, the lesson was a top-down game where the player could move left and right while "throwing" instantiated prefabs at animals that came towards them. That game/coding worked exactly as it should have for me and matches the coding I'm using in my personal project to the line. However, now the sphere I'm using as a placeholder for my player moves slightly to the right about half the time when I press the spacebar to instantiate a projectile. This did not happen in the lesson project.
I added a z-axis bound and turned off gravity because the "launching" was also moving the player on the y-axis (causing it to fly it the air at times) and z-axis some. I've tried upping the mass on my player, but that hasn't had an effect.
Any suggestions as to what might be causing the movement sometimes, but not always, when the projectile is instantiated and/or how I might fix it? Thanks!
Your answer
Follow this Question
Related Questions
Player movement 0 Answers
Look rotation viewing vector is zero & diagonal boosting 0 Answers
I'm having problems instaniating 0 Answers
Parent object to instantiate 1 Answer