Actually I'm making a space shooter type game. In which I'm adding trail to my player plane for this I'm using Trail Renderer
this is the screenshot of my inspector. Now the problem I'm facing is as and when I rotate my player plane trail also rotate and I don't want that to happen since the player rotate the trail should be straight only. Like this
Actual Problem :
Expected Result :
How can I fix this Rotation issue of Trail while I rotate my player. Do i need to code for this or what I'm not getting how do I solve this problem. I also tried to change the Alignment from 'View' to 'Transform Z' from inspector but its not solving the issue even I tried to change the Motion Vector but this also not giving proper result how I want. Please help me what can I do to resolve this issue. Thank You in advance.
Related
I'm trying to figure out Cinemachine to create some kind of Top view perspective. I managed to find the setting to make sure the camera keeps it's rotation, and follows the player. My issue now is that little extra movement that happens when the player is moving. Is there a way for me to get rid of it, so that my camera stays still?
What I have
Camera Settings
What I'm trying to achieve
Edit:
Edit after comment
Camera settings
You can set Body type to transposer and Binding Mode to world space:
Have you tried to change the aim setting to Do Nothing? If you leave it to Hard look at it will always keep your player at the center of the camera.
You can read the documentation here:
https://docs.unity3d.com/Packages/com.unity.cinemachine#2.6/manual/CinemachineVirtualCameraAim.html
I am a newbie in Unity. I have searched on the internet for tutorials on how to pick up GameObjects and followed them as it is. But here's the problem:
This here is when I set the Camera as a parent to GameObject, initially....
And here's what happens when I move the camera.
The problem here is that the Object doesn't stay on the crosshair
This happens only when moving the camera along the Up-and-Down Axis (not sure if x or y).
However, this doesn't seem to be a problem in any tutorials. Is there any part of the code missing?
P.S:- I have set the Camera as a parent to the GameObject in the hierarchy directly without any code.
It is difficult to know the exact problem without at least a video of it, but the first thing here is to make sure there's nothing messing with the object's transform outside of camera's parenting.
So, I've made a very simple game, which all you basically do is glide through the terrain and avoid the obstacles (I haven't implemented obstacles yet). And I've encountered a very strange problem. When ever I hit the fifth chunk, the player starts to flip:
Can anybody help me find what the problem is and how can I fix it?
Edit: I solved it by using creating a physics material with 0 friction annd applied it to both the chunk and the player.
This could be an issue with your colliders being just a tad too big. check the dimensions of your player's box collider and see if it is bigger than your player. If so make it fit to just inside the outer edges of the player box. Also, unless you ever plan to flip the player intentionally, You could always just apply a constant downward force (Rigidbody + gravity usually will suffice) to keep this from happening. Hope that helps!
I have successfully enabled 3d object detection through vuforia in Unity. I have attached a crosshair (reticle) at the centre of the screen in screenspace overlay. when the user moves his phone over the 3d object which is produced upon object detection, I want a label to appear when crosshair crosses different parts of the 3d object. I tried many methods including, collision, cursor and reticle. It is not working.
Is there any easy way to implement this so that I can use event trigger pointer enter to make few things happening on the game.
I successfully solved my problem. The solution is using worldspace crosshair.
Most of the crosshairs available in the assets are cemeraspace. therefore using a worldspace corsshair solved my problem. It may be useful to someone in future.
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.