So i’m planning on starting a game project in Unity, where you’ll be able to play as a wolf in a big world. sort of a wolf MMORPG game.
Now, all the graphic/modeling part is easy for me because i have experience in Blender and am able to create pretty good models.
putting that aside, i’m having trouble with the coding part. i’m no coder, i’ve been following a tutorial on youtube and were able to create very simple movement with JavaScript. there it is with my wolf model (and a random terrain I set up):
http://s13.postimg.org/56d04ff4n/unity_01.png
Now i’m having a big problem, it moves right/left/straight/forward pretty good, yes. but when it turns the entire movement gets jacked. left/right get straight and back basically the ‘compass’ breaks and it forgets what left and right is. starts moving in weird directions. i would appreciate if anyone were to help me on that, and if you are interested in joining the project as a coder, PM me and we can start thing going
any help is appreciated.
I dont know what you mean with the compas not working. But try to use manual input:
Instead of input.getButton("Forward")
use: if (Input.GetKey(KeyCode.D))
etc.
getting same results …
Maybe record whats happening as its not clear to me.
it moves just fine until i rotate my character, then it seems like the rotation direction spins faster than the character itself.
I rotate 45% but it moves 90% to the left when i press W
sorta like that …
Your pivot point of the wolf is not centred OR the script is attached to a gameobject, wich holds both the camera, and the wolf. While the script should only be attached to the wolf, inside the gameobject
transform.rigidbody.velocity = transform.forward * speed;
Try this.
Maybe it will work, maybe not
It works for me in my project.
Not sure though