Using a Rig Builder and Nav Mesh Agent Unity - unity3d

I am creating the enemy AI for my game and when trying to set up a rig builder to help position things like hands/head to grab the weapon/face the player. The problem is that this seems to make the nav mesh agent stop working. This means my enemy can't move event though its applying the animation (root motion turned off).
Anyone know a fix, Please Help.
Thanks!!

Related

Unity Ragdolls causing problems with mesh renderer

I've set up this enemy to turn into a ragdoll upon death, fly into the air a bit, and behave like a ragdoll. It is all working fine as far as i can tell.
Except i am encountering an issue where the enemy keeps popping in and out of existence, depending on the cameras rotation/position.
Here is what it looks like before the issue.
Then, from this position, if i rotate the camera slightly, it results in this:
The game is paused while this is happening so it is not related to movement in any way. I can also rotate the camera back and forth, and the model will continue to pop in and out of existence. No gameobject is being destroyed.
It it also nothing to do with the model clipping into / under the floor, as you can see in the pictures, i raised it up off the floor to test it, and it still happens while suspended in mid-air.
This issue only happens while the enemy is a ragdoll. If i turn off ragdoll deaths nothing like this ever happens.
Do you have any idea what could be causing something like this?
I am guessing that your enemy is using the skinned mesh render component. When using ragdolls and skinned mesh renders together the bones or vertices of the rig might get pushed out of bounds. Unity only renders your mesh if the bounds of it are in the camera view. The unity docs recommend either increasing the bounds or turning on "Update When Offscreen" on all of your skinned mesh renderers.
More info here

How to add an gameobject to an animated rig properly

I have moddeled and rigged an human in blender and I am able to play that animation in unity.
Now I am trying to add some objects to the human. For example an hat. But I cannot figure out, how it is made that the hat moves withe the animation.
I know, that the head has got the animation data. The hat does those data not have, hence the hat does not move.
How do I do this? Another scenario would be grapping sth. with the hand and that object should move together with the hand movement.
I would like to add those objects via script later on.
Thank you very much :)
In your character's rig in the unity scene,
Find the Bone that you want your target GameObject to follow, and add the target GameObject as a child of the bone GameObject in the Scene heirarchy, and position it with whatever position and rotation offset you need (In this case, on the head bone, maybe a little tipped)
In this case, you would find the Head bone of your rig, and add the Hat as a child gameobject of the head bone. Any animation you play, which modifies the bone positions should also move your target GameObject.

label text on Controller Unity VR

I want to add label of text on my controller of HTC VIVE in Unity like that but after many research on internet, I don't find how to do.
Someone can help me ?
thank you !
Steps to create text on controller :-
1.Drag camera rig prefab in your scene.
2.Attached Player script of stream VR plugin on camera rig.
3.Attached Hand script on both controllers.
4.Create a empty game object as a child of each controller ,set their local positions at (0,0,0) .Now add script ControllerButtonhints on both. Drag controllerbuttonhints material on controller material ,set any flash color,drag prefab controllertexthint from stream VR prefabs.
5.In Hand scripts drag other hand i.e. in left controller drag right controller and in right vice versa , set starting hand type is Any for both controller.,drag controller prefab as blank controller prefab in stream VR .
In player script ,drag camera rig to tracking origin transform, add camera eye as hmd transforms ,add both controllers in hands array,leave other things none and untick allowtoggleto2d also.
7.Last step is comment line no 279 -288 as we don't required for our current purpose.
Although my English is not so good but may be it help you.
Thanks,

using unity physics with SteamVR

I want to make a plank game in VR with Unity. So when the player walk outside of the plank, he falls. Right now the only way to make it work is by using VRTK which is another physics system and it makes a lot of things complicated.
I've put a rigidbody on the CameraRig and uncheck "is kinematic". The player falls, but the colliders on other objects are not working anymore...
Is there a way to use Unity's physics with SteamVR and without VRTK ??
Thank you !
Firstly I would read up on Rigidbodies and Colliders/Trigger Colliders - here's a link.
Here's a useful table from that website:
You will need to use this to understand why the player is falling. Is the CameraRig actually colliding with the ground? Is it a Trigger Collider (which has a callback method but doesn't do any physical collision). There's many possibilities for why.
I wrote a script that you can drag in two objects and see if they collide. You could use that if it helps.
The issue in VR with Vive is that determining where someone walks can be difficult, as we are only tracking their head and their hands. If you have a Vive Tracker available and it fits your use case you could use that to track someones foot.
What I have done in the past is use the Camera(eyes) GameObject within the CameraRig and get it's transform.position.x and transform.position.z value to determine if it has gone outside of the boundaries of the object the user is standing on.
Hope this helps,
Liam

Scrolling Scene Background - Unity

My title might have actually been a bit misworded, as to be honest I'm not sure how to word it, but basically I'm making a game on Unity and I have my main scene and I am making a main menu however what I want to do is have a, I guess, camera slowly panning around the main scene as the background of the main menu. Not sure if I worded that right or what wording to actually type into Google to research it so I'm hoping you guys might be able to point me in the right direction.
Cheers guys,
Jason
As stromdotcom mentioned you can attach a script to the camera.
It's hard to tell what you're trying to do but if you want to circle the camera around a point...
Try making an empty game object in the middle of your scene and point the camera at it.
Make the object the parent of the camera (using the object and cameras transform properties).
From here you should be able to set the game object to rotate using a script, which should make the camera spin as it is a child of the object.
I have not tried this in Unity but I have used this technique in other programs so I'm assuming it will work. Sorry if it doesn't.
If your scene is already set up then you can attach a script to your camera which simply modifies the camera's transform to move it around the room. You can move and rotate the camera just like any other transform in your scene.
Im pretty sure what you are looking for is "Animation view". Unity has a tutorial on it: https://unity3d.com/learn/tutorials/topics/animation/animation-view?playlist=17099