Unity: Third Person Collision with Animated Platforms - unity3d

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.

Related

Don't animate hands in Unity 3D

There was a problem with the animation of the character's hands. I do animations in Blender, naturally I had a ready-made character, from which I cut out the arms and extra bones. Animated separately hands and exported to fbx. But there is one problem, the animation plays, but the hands do not move. As I understand it, you need to move towards the bones. But they are all right, which is strange. Simply I choose in the panel "Inspector" Rig - Genric. In fact, everything should have worked in the best way, but no matter how I tried, I did not fix this bug. Reworked the model and so on. Maybe I'm doing something wrong?
All I tried was to remake the bones of the arms, remake the arms themselves, I tried to experiment with "Rig", but I did not manage to achieve the desired result. If you turn on "Rig Bone", you can see the bones of the hands. But everything that was done did not help

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

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 :)

Instantiating Objects at Different Intervals Unity

I am trying to make a 3D jumping game where my character is standing still and the objects and background are moving towards him to make it seem like he is running. I have a bunch of models for buildings that I am instantiating using an empty game object that I use as a spawner. I want the buildings to spawn one after each other, so whenever one building has moved far enough and left enough space the next one should spawn. I first tried to do this with InvokeRepeating, but the buildings are different widths so it does not work well with a constant repeat rate. I then tried to put a collider on my spawner and spawn a building whenever the spawner collider is not colliding with anything, but it seems to just spawn buildings infinitely. Is there a way to fix this or a better way to do this?
There are many different ways of doing this.
The most straightforward is possibly to let each building spawn the next one, as I assume they each know how wide they are and thus when it's time for the next.
Well , first things first your problem is looking more like a design problem. I would recommend searching things like "procedural world building" , also object pooling. There is lots of examples of runner games that do what you describe.
You can check the palyer position to instantiate , you can create parts of the road as prefabs , make lots and lots of prefabs and instantiate them as you go etc. The question you asked is simply too wide to give an actual answer. So if you have any more spesific questions , it'll be nice to answer !

VR: How to form hands around object they are holding in Unreal?

I'm working on a VR project in Unreal and I'd like my player hands to form to certain objects whenever the user grabs them. (I.e. the way our hands work) Unfortunately, I haven't really found any examples online of others doing this.
For example, I'd like when the user picks up say a hand held tool like a hammer that the hand would wrap around the handle. When the user grabs a basketball the hand shouldn't be closed but, expanded like a you would if you were to palm a basketball in real life.
I haven't done a lot of testing with this but, I'm pretty sure since the hands are based off of a Animation Blueprint that they simply ignore collisions and follow the animation.
I guess the simplest solution would probably be based off of collision where the hand plays an animation and as the fingers of the hand wrap around the object they stop at that position where they collide with the object in question. If it is even possible that is.

Curled fingers: Unity3d

When I played imported animation, the character's fingers get curled and his mouth opened. I might be able to fix that by editing adjusting bones in unity. But with so many characters and each time dragging them from assets to scene.
It's a bit too much misery and it's slowed me down, I need this get done fast.
Unity Masters, PLEASE HELP ME.
the bones in your imported model rig must contain all the fingers and other parts bones that doesnt move correctly , if it does then assign them to your avatar as you are setting up your avatar (look here for avatar setup) , after that if your animation animates fingers then your model will also
So that's right you don't get timely help. AnyWays,
[SOLUTION]
The animations was imported from iClone 5. Now I was importing animation separately and then applying it to the .fbx character. So I alternatively imported the animations embedded with the character. Now this is helpful only in case the original character is also being imported from iClone. Then in the rigged configuration I reset the pose>Enforce T-pose>automap> again automap>enforce T-Pose. Worked for me.
[SOLUTION2]
I had alternative in which I could mask hand animations (not using them) and remove jaw from 3d exchange while exporting fbx. But they looked so lovely I had to look further.
Sometimes you can't find the solution, I guess you are the only solution then. That's how everybody learns. hopes it helps.