I am using cinemachine to make a camera that follows the player in a 2D top-down game. The problem is that pieces of the background disappear and reappear when the player moves, and some of the outlines of objects seem to render late in comparison to the rest of the level. Below is a link to the video showing the error. If anyone could help it would be greatly appreciated.
https://youtu.be/BiEojQQGFn8
Related
I'm using unity 2018.4.14f1 personal (I don't use 2019 or 2020 because it lags my computer)
I'm using the Unity Standard Assets Player Prefab and Cinemachine Freelook for the camera. I have some water, and when my player walks into it, its fine. However, when the camera comes into the water, it stops rendering the water. Is there anyway I can fix it?
Update: I've somewhat got it working, however its hollow when your inside. Is there anyway to fix that?
Video : https://easyupload.io/2b0p3a
(I'm quite a noob so if you need any screenshots please ask.)
The problem here is that the water will only rendered when looking from the outside as the normalized are modeled so. The program renders outs objects that it thinks is not in view. You can load the model into a 3d program and then copy and invert the model to allow your camera to see the water, or I believe there are some shader option to stop this optimization. You can also look in this Reddit thread.
Hello I was trying to build my first 2D game using a video I saw on youtube. The thing is the camera keeps on moving downwards and away from the game character.
Create a new camera and make sure the view is on your player.
Go to Window -> Package Manager and search for Cinemachine.
Import Cinemachine Package.
Create new Cinemachine 2D camera and set it's Follow to your player gameObject.
More information would also help.
I am using Cinemachine asset in my Unity project and is working fine without any lag. However, the places in my Scene which has a lot of ladders, are facing intense lag, making the game unplayable. Such a scene is shown below.
Reasons that I can think of the lag is too many collisions happening or the cinemachine(may be). Two images below show the physics shape of the ladder sprite.
My camera is set-up inside an empty gameobject called "Cameras" as shown below. The state driven camera utilizes the player animator which is shown in the second screenshot. I am afraid that I can not provide a minimal reproducible example in this case. Could someone help me by pointing in the right direction to fix the lag?
EDIT: Unity profile also suggests that Physics usage is consuming too much CPU with CinemachineBrain.AfterPhysics() and Physics2D.FindNewContacts being the major culprit:
EDIT 2: The ladder is created using a tilemap component as shown below:
Can you try simplifying the collider boxes for the ladder to a single box collider shape?
I was messing around with my gun position in unity when I notice that when I shot the gun this shuriken icon thing showed up over the particle effect, which was working fine when I tested the game in unity other than the shuriken icon but when I build the game then run it I can't see the particle effects when I shoot.
Any Help would be appreciated.
I cant see any of ur code. But make sure in script u call ur particle system to play
I am following Aiden is All Knowing's Multiplayer FPS tutorial and can't seem to solve this issue.
I have copied and pasted the exact code he use in the video (https://www.youtube.com/watch?v=kTzR3ypM_Qc).
When I launch the game everything works fine but when the second player joins problems arise. When one player moves the other moves instead of it and when one player shoots the other the player who fired the weapon receives the damage and the second player does not have the fps cam activated!!!
I have put the character prefab in the correct place btw. AND THERE IS NO ERRORS!
Sorry if the answer is blatantly obvious or in the video, I have spent 5+ hours trying to fix this. :(
Player Inspector
Fixed It! I had a camera enabled when it shouldn't have been so.