I'm making a multiplayer game, and something that a player can do is slowly turn invisible. For the player that calls this function to turn fade out, it works flawlessly from their POV. But from another player's POV, their opacity doesn't change at all.
I use a coroutine for the opacity, but it won't sync up for any of the other players.
Related
We currently are working on a multiplayer game with Unity Netcode. The game is a racing game with relatively high speed. The player objects get synchronized with the Network Transform component.
We have the problem that the player is lagging a little bit (or junpig some steps forward instead of moving smooth).
The interpolate setting on the Network Transform makes it a little bit better but not completely.
Something we could observe is that when the own camera isn't moving, the other player isn't lagging at all, but since we have a racer game the camera moves all the time.
We could finally fix the problem. More information: https://forum.unity.com/threads/how-to-prevent-jitter-with-network-transforms-in-netcode.1387044/#post-8733624
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
So I separately imported the player mesh and the animation from blender. Everything is the same except, if I exported the character(mesh) again with the animation (I exported the animation only because as I said I already had the mesh) it will be a bit bigger than the one I use. I created the Animator and hookup the animation and when I play the game, I can see the Idle animation looping over and over again in the Animator tab (which is perfect). However, I don't see the animation playing on my mesh. I can provide you with additional information if it helps.
I've followed the brackeys tutorials to make a 2D Player Character jump but having issues with the jump animation. When I hit jump, the Player goes into the air but it'll play the idle animation in the air til I give another keyboard input. If I hit jump again while in the air, it'll play the jump animation and go back to idle when hitting the ground.
In the animator I noticed that the jump animation triggers fast and seems to be overridden by the idle animation. I've loaded and compared the working final brackeys project, and rebuilt the animator nodes. The code and everything in the editor are the same but the only thing I can think of is that I'm using different art assets.
Here are the tutorials I followed.
2D Movement: https://www.youtube.com/watch?v=dwcT-Dch0bA
2D Animation: https://www.youtube.com/watch?v=hkaysu1Z-N8
Could you post some screenshots of your Animator Controller, its animation settings or code, please? I suspect it might have something to do with transitions or events.
I want to know that if it's possible to have a game scene in your game that allows any player to animate a character?
Let's ignore the cognitive load a player will face while animating a character and assume that, somehow, we manage to abstractly present it in a game scene. Can we make it happen that after player's making of certain animation, unity stores that in a .anim file and in the next game scene the player can play a character having that specific animation?
I think calling it real time in-game animation creation would describe it.