So I have run into a number of issues that I can’t seem to debug. (Unity 5.6.0f3 + VS2017) They all seem to come to a head in Click to move hence the reason I am putting this here.
Issue #1 - All my print(yadda.yadda); lines continuously print out in Update and FixedUpdate. In Update the print(cameraRaycaster.layerHit); in cursor.cs scrolls to infinity as soon as I hit play. The walkable print statement prints to the console as Ethan walks around. I have gone through the lecture a couple times and can’t seem to figure out what I have done differently. It looks like each should print out once not either infinite amount of times or repetitively during animation. (eg. I click the ground 5m away from Ethan and the console logs the walkable print statement over and over until Ethan gets to his destination)
Issue # 2 - My Enemies are on layer Enemy yet when I click on them the camera / cursor sees right through them and clicks the ground behind them. This is true for blocks with layer Enemy and multiple Ethan’s on same said layer. The other thing is the console never logs the text in the print statement for enemy so it is like they are invisible. Ethan will walk through the enemies but not through blocks on the Enemy layer. He stops but his animation keeps going as we
Issue #3 - distanceToBackground is set yet Ethan runs right off the edge of the earth. It’s quite amusing as he decends into infinite darkness but not quite the functionality I want. I set the ground size to 210,1,210 so it is more than 100m in any direction from the center. However with the parameter set at 100 he still leaps to his death. As above the console doesn’t log the default print statement but then again Ethan never seems to hit that invisible wall so I guess…that makes sense?
Main Issue - If I click on the ground and then want Ethan to move via WASD he does this awesome little dance with his feet. (Much like the moves I had in the clubs back in the 80’s) If I wait for him to stop, WASD works but Ethan turns into the Flash on like 20 red bulls and screams away so fast the camera can’t catch up. Why is his speed and animation so drastically different with WASD than with click to move? I have played with all the attributes under Third Person Character and that doesn’t solve the problem. So how can I use both click to move and WASD at the same time? Also how do I adjust his move speed with WASD? When I change the parameters it does affect the click to move speed and animation but not WASD.