I am Sorry for the simple question, I have prepared one model in blender and imported it in unity and wants to make ThirdPersonController.
1) I have added the model in the scene and added component -> Rigidbody, Capsule Collider, ThirdPersonCharacter(Script), ThirdPersonUserControl(Script), , which is all by default.
2) I have uploaded the video on this url also - http://tinypic.com/r/34hw8jo/9 for better understanding, here in the last, you see , when i click on space, it jumps but does not come back to ground.
3) I dont know what i am missing ?? , Please help me in this regard
Thankyou
You need to set the flag "use gravity" so your player can experiment that force.
I recomend you to check out the Rigidbody documentation in Unity.
Hope it helps.
Related
i am doing a tutorial for making a basketball game on unity. (https://www.udemy.com/share/101uUY3#-3V6juuSNcls89IERileIvuAAnAKmHT1RZLywggv58TF_aJfcALyzHoWC3bpgzklCA==/)
when i make the ball, it floats, and it doesn't fall, and in the tutorial they say to make it a RigidBody to make it fall, and to make it move when i touch it. well, it helps with falling, but when i touch it, i just go on it like it is a staircase
anther piece of information that i think is important: in the tutorial they use the old first person view(fpsController) through assets>import package>characters. but unity removed that, and they say in the internet that i should download the new first person controller from here: https://assetstore.unity.com/packages/essentials/starter-assets-first-person-character-controller-196525 and i changed the default PlayerCapsule scale to 0.001, 0.001, 0.001 and turned off "casting shadows" because i didn't want the capsule to be visable
p.s: this is my first question on stack overflow, and my first project in unity, so if i did somthing wrong, please tell me.
I was working on simple 2d game and in that at player end, I want to attach trail effect. So I have added trail renderer component by creating child empty gameobject.
Also I have set proper trail rendering order as well. Here are more details with images so please check these:
Actual trail get drawn but not visible on game or in scene area.
Here is the component values those I set for trail renderer:
Now I hope you got my point so please share your suggestion regarding this.
Thank you for giving time for this question :)
Trail Renderer more details:
Player more details:
Gameplay more details:
Actually game play remain at same location, just I am dragging player ball through mouse so no rotation get included.
Still if you need more information then you can ask for that I will provide those as fast as possible.
I have solved this problem after doing some tries. Here I am posting an answer so this become useful to other members.
I require to set Material type to Mobile/Particles then after it become visible within game play. Though sorting order related setting is necessary that I was did before. But material related settings I don't knew before.
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
I'm trying to do some Augmented Reality in Unity using the Vuforia plugin. I've managed to get everything working (I'm using a 3d model of a car), only the position of the car relative to the marker is wrong when I come to preview it (click the 'Play button at the top and watch through the computer's camera - is 'preview' the right name for this?).
It should be sitting on the the marker in the center, but instead it's floating above the marker and off to the side by quite a bit. The positioning is definitely right in the program itself, so I'm not sure why this isn't reflected in the preview.
Also: at the moment the car is simply an untextured grey object. I realise the textures are included in a subfolder, however I can't drag the entire car's folder (including the Textures subfolder) into the ImageTarget, only the .3ds file itself. Does anyone know how to apply the original textures to the car?
Thanks so much for your help in advance!
Ben
Well, to start answering your question about the drifting away part, you've probably got a Rigidbody attached to your Car? Well, if that's the case, then Go to the Inspector where the Rigidbody is and you'll see constraints.
To avoid it floating off, you might want to check Freeze Positions for whichever direction it needs. Probably Y axis.
Now, I'm not entirely sure if you're using Vector.AddForce to move your objects, but if you are then just check if your car can move if you've put all constraints on.
If you can't then in your code trying using Object.Rigidbody.SetActive(true) when you need it to start moving, and Object.Rigidbody.SetActive(false) when its done.
On the other hand, if you aren't using Vector.AddForce() then remove Rigidbody component if you've used it.
As for the material. If you've got the material in your folder that you've downloaded then just drag and drop it into Assets. Now sometimes your car may be one solid mesh, but some times it may be multiple meshes. So which ever the case. Drag the material from your Assets onto the Hierarchy panel over your car mesh/meshes and it should turn into that color.
Hope it helps. :)
For some reason when I run my game the camera which follows the player has a slight jitter to it. If I watch the transform the Y position values are fluxuating and the rotation is affected aswell. I can not think of any reason for this to be happening other than maybe having more than one camera as my water comes with a 'reflection camera'. I am using basic unity packages, and even when rewriting the camera follow script, the problem still occurs.
I know there is not much to go on here, as the code is minimal for this issue(using 3rd person controller and camera components). I hope someone has had this error in the past and fixed it or knows enough about unity to help me out here because im lost.
Much appreciated
EDIT
Dont know if animations could be effecting it but I thought id mention my model has animations
To resolve your problem. Click Assets->Import Package-> Characters Uncheck everything Execpt. SmoothFollow.
Drag Smooth Follow to your Camera. Drag your Character to the Target from Smooth Follow Script.
If this doesn't fix the issue. Try to remove your own script.