how do i make a 3d character move in unity with WASD? - unity3d

I am new to Unity, and I want to make a 3d character movement. Please help me. I have tried tutorials, but they don't work.

You first have to choose what kind of movement you want to accomplish i.e: 1st person, 3rd person etc. And saying that YouTube tutorials don't work definitely means you are missing something. Here are some good tutorials for different 3d movement. Please follow them thoroughly.
1st Person:
https://www.youtube.com/watch?v=_QajrabyTJc
https://www.youtube.com/watch?v=XAC8U9-dTZU
3rd Person:
https://www.youtube.com/watch?v=4HpC--2iowE
You can find a ton more movement systems on Google.
Your movement depends on your usage. You have to use a different approach if you want it to be Character Controller based than Rigidbody based. So learn the basics, and then experiment on your own until you are happy with it.

There are tons of ways to make a player move in 3D, and there are just as many tutorials that explain it. If you need a place to start, see the character controller component.
If you have a 3d model of the character, just add this component and it will start moving right away.
the gameobject does not have to have rigidbody or collider components, because it takes care of the whole character controller.
If I gave you a hand to get started, you can mark my answer as accepted, and vote it positively :)

Related

RealityKit AR Directions

Is it possible to make like an AR GPS type thing using RealityKit? Kind of like the lines that appear on the road in Watch Dogs.
I’m having an issue figuring out how to place objects in the correct direction. For example, I’m trying to make a line that goes straight towards the north pole, so you’d have to point your camera in that direction on the ground to see the line. Is this possible? My entity is always placed wherever the camera is pointed at. How do I place it in a predetermined position?
I learned a lot about that kind of thing from working through these examples on GitHub:
https://github.com/vasile/ARKit-CompassRose
https://github.com/ProjectDent/ARKit-CoreLocation
Neither is very recent, but all the concepts are there.

Unity - Randomly generated Worms like destrucible terrain advice

I've been looking online for some guidelines for this and have had no luck.
I'm having issues with the destructible part of my terrain.
I currently have a script which fills in a 2d array with 1's and 0's and then continues to create a mesh and collider from this array.
The trouble I'm having is that I have no idea how to detect a part of the mesh which was hit with an explosion and then almost cut the explosion from the mesh. I'm struggling to find any hints on how to modify a runtime generated mesh.
All I've been seeing online so far are 3rd party assets, but I'd like to avoid using assets as much as possible.
I'm not asking for someone to provide me with a solution, rather, point me in the right direction.
I'm sorry if this explanation was lacking, but in short, is it possible to modify a mesh at runtime and if so, how?

unity character attached to game object

I'm quite new to Unity and there is one thing i couldn't think of how to make it and i couldn't exact information either so here i am. (sorry, my English is not perfect)
what i want to do is attaching a character to game object.
In my game, player(user) will control or steer the game object and the character attached to the game object just Looks as if it's riding or driving the game object.
(to help you understand, maybe you can imagine that player control a skateboard and there is a character on it)
So far, I tried 2 ways -
1. I made character as child of the game object, and gave an animation to the character but i found out it is not looks very natural.
2. I made a ragdoll and tried to attach it to the game object by using fixed joint between the game object and the character's feet but in playing mode, only ragdoll's feet was moving with the game object.
So I wonder if there is a good way to do it.
Anybody can give me an advice? I would so appreciate it.
Thanks in advance.
Your solutions is here, and its called IK:
1https://docs.unity3d.com/Manual/InverseKinematics.html
Invere kinematics isn't an easy topic and you will have to test it a lot(of course you could find some workarounds) but if you want the most elegant solution give it a try.

How to ensure sprites face the correct direction at all times in a 2D top down game. (logic)

I am making a multiplayer top down 2D game with 3d elements. All my movement, healthbars and basic functionality is working flawlessly even while hosted and playing on a server, node.js socket.io. However In this game it is possible to move the camera like in Realm of the mad god.
in case you are in doubt here is a video: https://youtu.be/4tdcxl3aZ0c?t=31s
This of course means that the players can end up being upside down with regards to each other and I cannot find a solution that works in all regards to make sure the sprites of the other players are always facing the correct direction with regards to their movement.
I have made several solution to this problem which cover most scenarios but while play testing other things we always end up noticing that the sprites sometimes face the wrong directions. So I am wondering if anyone has an answer, the logic, the fixing this problem.
Things I have tried:
Adding a gameobject to the camera to which all sprites asses their change in distance and determine their facing direction based off that information. (this leads to the players sometimes flipping erratically when the camera is moved and they as well are moving as sometimes they may be moving slower and there although moving left the camera approaches from the right and that flips them)
Adding a gameobject to the world which allows all sprites to have a fixed point to which they can measure their change in distance and therefore also know what direction to face (this worked somewhat better as they always know what direction they have to face, however once the player is upside down everything is inverted)
Emitting to the other players wether I am upside down or not in order to try to reinvert the above solution in the case I am upside down. (I could not find a good way to do this, and it got me thinking that this must be a problem people have fixed before many times and perhaps someone know of a good solution that works.)
thank you all for your input.
I seem to have found a solution for this issue that works decently well. Keeping in mind that I do not want to have the server being involved in this and I would rather have each individual sprite know its direction rather that have something heavy trying to determine this logic I came up with the following solution. May not be the best but it works. Still very keen to hear other solutions.
On my main character I have a switch case, which changes depending on the players rotation in the world. I need this switch case anyway for fixing (http://answers.unity3d.com/questions/1348301/trying-to-change-the-cameratransparencysortaxis-to.html?childToView=1348316#answer-1348316) that issue.
As the cases change I simply place the gameobject that I want the sprites to compare their distance to at 1 of 4 positions. YPos, YNeg, XPos, XNeg. Meaning that the sprite now determines its facing direction based on a gameobject that is placed in accordance with the Players position. without having to place it on the camera.
I will update if during further play tests this gives me trouble but thus far it works in the all the cases I need it to.
Still very willing to hear other solutions to this problem.
Thank you.

Unity: Third Person Collision with Animated Platforms

first time posting on stack and everything looks promising so far! I had a bit of a complicated question here so I'll do my best to provide exact details of what I'd like to get accomplished. I'm working with a third person controller in unity, so far everything is going great. I've dabbled with basic up and down platforms, a little glitchy but things work. Anytime my player runs through a mesh I make sure the mesh collider is working and a 'rigid-body' is attached set to Kinematic. Here's the kicker, in my game I have turning gears which the player can jump on. This is great except for the player doesn't turn with my gear, which would make sense according to my game-play. What would be the process for getting my character to interact with this animated mesh? I imagine some sort of script which my nooby mind cannot fathom at this point in my unity career. If anyone out there knows the solution to this, I would love to have any assistance, either way I'll plugging away at a solution. Thanks again!!
This is assuming that you're using the packages that ship with Unity3D, which it sounds like you are. After importing the Character Controllers package, you'll have a bunch of scripts in the Standard Assets\Character Controllers\Sources\Scripts folder, in the project hierarchy view. There's a script in there called CharacterMotor.js, attach that to the same GameObject you're running ThirdPersonController on.
Essentially this script adds more interactivity between the character and the scene. There's several methods inside this script that automatically move the character when in contact with a moving object (as long as it has a collision mesh) basically by inheriting the object's velocity.
If your gear/cog wheel has a proper collision mesh set up, adding this script to your character should be all that you require.