Be the first to post for 'Simplify Unity's ThirdPersonCharacter Class'!

If you’re reading this, there probably aren’t very many posts yet. But don’t worry, you can be the first! Either create a new post or just reply to this one to say ‘hi’.

since ben started refactoring, in the RPG course in this lecture,i thought, i might as well refactor mine, instead of just watching

the code numbers are almost the same(and if i actually go to an eariler commit, i found that i had more code) but now, i got 1 script, that handles all of the things, instead of the cluster that i had earlier which is:

Attacker, PlayerAttacker, AiAttacker, BasicEnemyAttacker, IWeaponHandler, and parts of the PlayerStateController, And parts of BaseUnitController.

have now all turned into a simple WeaponSystem script/class that all my characters have :smile:
feels good, to have everything in one place :smiley:
(though, as you may already noted from my scripts names, i have deviated quite a bit, from Ben, but i still find the course very useful, even though, i am doing my own thing.)

image

First time posting here! Loving the course although am a bit sad that I’m nearing the end of Part 1 and Part 2 is months away!!

To the point of my post. I’ve run into a problem as a result of this lecture. I am wanting to have direct movement for my game and as such have kept the relevant code. I can now switch between the two and the functionality (including jumping in direct movement) is working. However, I have a bug where my player’s y position is not at 0 where it should be. To summarise:

  • In click to move mode, it is: 0.04402447
  • When I switch to direct mode, it is: -0.01500118

I’ve tried to set the transform.position.y value programmatically when switching between the modes however this is not sticking.

Anyone else having this issue or a similar one and any ideas on how to resolve it would be fantastic!

Thanks,
Greg

This seems to have broken all of my abilities, is this fixed later