Im new to Unity and fairly new to Javascript. I am creating a game that uses a movement and camera system similar to Xenogears, and I have the character movement script and the camera script working correctly. However, I have scripted the player character’s movement to be effected by other objects in the scene. Im looking make it stand on the ground and not pass through walls and buildings.
I was wondering what the best way to go about this is. Im not sure how difficult writing a script from scratch would be. I see my options being to write a completely new script to handle it, to take pieces from the provided 3rd person character controller script and add them to my current script, or to go into the provided character controller script and edit its movement to operate like the script I’ve written.
The problem with all of these is that Im not experienced enough with javascript to be able to fully follow whats happening in the provided 3rd person character controller script. I have been learning the scripting needed as I go along form online tutorials and am having a hard time finding any that relate to the way the collider system in Unity works.
So far the script I have rotates the character in the direction of the arrow keys and then moves him forward. Up moves north (0 degrees), Up and left moves northwest (45 degrees) and so on.
Any help or advice would be appreciated. Thanks.
EDITED: So I checked out the character controller, and realized I can pass all of the movement scripting through it and get the same results as adding the scripting directly through the prefab, so I feel like this solves most of my issues. The only question I have left is how to make the character controller actually work? Like the scripts I use to make the character controller respond to other objects.