|
I am making a ninja game and i made a pretty cool ninja using the basic objects in unity because i don't have a graphic design program (or the money for one) to do it. now because the colliders are clashing when i click the forward button i fly in the air. i tried changing the size of the the colliders so they were not touching and moving the objects so they did not touch the other game objects but i still slowly move up. this is my walking script.
(comments are locked)
|
|
I have also an answer, that it more Easy. In the game I am creating now, i used a game object. I did so the game object was to be a prebab or what the name is. And so, i added a camera, a characher controller. And now It can be constrolled as you want to.
(comments are locked)
|
|
Try using transform.forward rather than TransformDirection(Vector3.forward). You might want to consider putting it directly in the SimpleMove or creating another variable other than "forward" (I get nervous when using variable names that are already in use on other Components) Also, your character will move at different speeds depending on your framerate. Try multiplying your move by Time.deltaTime in order to keep the movement framerate-independent. EDIT
Try the above. Let me know if you still have the same problem... there's one more thing I can think of trying... could you just script that becasue i changed the line to: var forward = transform.forward; and i still fly, i think it is because of the colliders
Jan 11 '11 at 05:52 AM
Tyler Alvis
(comments are locked)
|

Can you give some more details about what objects are in your scene? For example what are you using for the character and floor? And what colliders are attached to each. This will make it easier to recreate your scene and debug the problem.