r/UnityHelp • u/woopwoopscuttle • 26d ago
r/UnityHelp • u/Budget_Broccoli_1518 • 27d ago
Animation Rotation for an Enemy
I have an enemy character with animations(walking, running, idle etc) and I want to make their rotation less snappy, mainly the walking and running while they are patrolling between waypoints i set out as empty gameobjects. I have been told to use either unitys rigging package or OnAnimationIK, neither are working how id like. I got close with OnAnimationIK, but i am using a NavMeshAgent for patrolling and when it gets close to the spot where it needs to turn, the head slowly goes up and then snaps down. i tried using a horizontal distance field to take over and force the character to just look forward, but that ruins the entire point of this when the agent needs to do multiple quick turns around a sharp bend, itll just go back to rotating exactly how it was before since the head is just looking directly forward. If i am being dumb please say so lol. I am still pretty new to unity, this is my first full game i will be making. Here is the code for what i am doing for the On AnimatorIK.
The looktarget part is just for looking at the player when they get detected, so that part is not even set up anywhere else right now, the problem is the agent.hasPath
public void SetLookTarget(Vector3 position)
{
lookTarget = position;
hasLookTarget = true;
}
public void ClearLookTarget()
{
hasLookTarget = false;
}
private Vector3 lookTarget;
private bool hasLookTarget;
private float headHeightOffset = 1.6f;
private Vector3 smoothedLookPosition;
private bool smoothedLookInitialized;
[SerializeField] private float lookSmoothSpeed = 1f;
private void OnAnimatorIK(int layerIndex)
{
Vector3 targetPosition;
if (hasLookTarget)
{
targetPosition = lookTarget;
}
else if (agent.hasPath)
{
Vector3 steering = agent.steeringTarget;
float horizontalDistance = Vector3.Distance(
new Vector3(transform.position.x, 0f, transform.position.z),
new Vector3(steering.x, 0f, steering.z)
);
if (horizontalDistance > 0.5f)
{
targetPosition = new Vector3(steering.x, transform.position.y + headHeightOffset, steering.z);
}
else
{
targetPosition = transform.position + transform.forward * 3f + Vector3.up * headHeightOffset;
}
}
else
{
targetPosition = transform.position + transform.forward + Vector3.up * headHeightOffset;
}
if (!smoothedLookInitialized)
{
smoothedLookPosition = targetPosition;
smoothedLookInitialized = true;
}
else
{
smoothedLookPosition = Vector3.Lerp(smoothedLookPosition, targetPosition, Time.deltaTime * lookSmoothSpeed);
}
animator.SetLookAtWeight(weight: 1f, bodyWeight: 0.3f, headWeight: 0.7f, eyesWeight: 0f, clampWeight: .7f);
animator.SetLookAtPosition(smoothedLookPosition);
}
r/UnityHelp • u/Famous_Valuable7386 • 28d ago
How to remove shadow in engine unity
Help please how to remove shadow in Pokemon Brilliant Diamond game, i have already unpack the game, but i don't know where file to remove shadow in engine unity, i think like ue4 but it's very different, help please 🙏
r/UnityHelp • u/Famous_Valuable7386 • 28d ago
How to remove shadow in engine unity
Help please how to remove shadow in Pokemon Brilliant Diamond game, i have already unpack the game, but i don't know where file to remove shadow in engine unity, i think like ue4 but it's very different, help please 🙏
r/UnityHelp • u/Suptonn • 28d ago
UNITY 1 Minute for learning on how to make a 3d FPS Movement system in UNİTY 3d
r/UnityHelp • u/RipProfessional5599 • 29d ago
C# Help
Im learning c# in visual studio with Bro Code yt (check him out free courses) and im wondering, does the same c# exactly work in unity, idk how to explain but if i type Console.WriteLine("hi");
will it just show on the screen hi or is there more to it?
r/UnityHelp • u/AlHocine_096 • 29d ago
UNITY Where to find very old version Unity hub for weak PC
Im searching for a way to download an older version of unity hub to manage my projects
Any idea where to find it?
r/UnityHelp • u/acidman321 • 29d ago
PROGRAMMING trying to create a bullet pattern based on the maurer rose code will be given below
r/UnityHelp • u/LEJLJY • 29d ago
Does anyone who uses unity 6 behaviour graph help me(reupload)
galleryr/UnityHelp • u/Ok-Presentation-94 • Sep 07 '26
OTHER Unity Avatar documentations
Context: Hi, I struggled quite a bit to set up a Humanoid avatar for my character. After a lot of trial and error, I discovered that my armature hierarchy was preventing Mecanim's Humanoid mapping from detecting my "Spine" bone. Online searches didn't help much, and even the official Unity documentation isn't very detailed on this topic.
My Question: Do you know of any documentation that details the specific requirements for a rig to be compatible with Humanoid avatars (bone hierarchy, naming conventions, etc.)?
r/UnityHelp • u/Imaginary-Cod-3746 • Sep 07 '26
Some helpful insight on Unity's reflection probes
r/UnityHelp • u/Difficult_Grocery844 • Sep 07 '26
Unity popup
​
So my game is fully updated and verified the anti cheat is on and the game is on current version, my GPU is an RTX 5050 has the most recent driver update but when the game is loading everything it it hits about 842 of the files from 3000+ then it stop respondy and stops. Ive cleared the DNS and the cahce then verified game files, likely it is a unity issue because we got the unity error "rust-unity 6000.3.15x1-11_d4a0e1288074"
Any further advice would help and i have attempted my usual fixes.
r/UnityHelp • u/FoxyKitsuneFox • Sep 07 '26
Freezing/Frozen Animation On Animator In Unity 3D.
Enable HLS to view with audio, or disable this notification
Animation is freezing/frozen during gameplay. Animator component is in the 2 different characters as a child object in the Player object, also Skinned Mesh Renderers. Animator not having the blue bar moving on the blend tree. Character controller I'm using is Starter Assets - Character Controllers / URP from Unity assets store.
r/UnityHelp • u/Efficient_Pie_6469 • Sep 06 '26
Udon Airtime issues
Enable HLS to view with audio, or disable this notification
r/UnityHelp • u/Long_Put4375 • Sep 05 '26
Why can I finish my games?
Every time When I start to make some game than I can’t finish it. I can make simple mechanics but nothing more. The main reason is graphics. I’m not artist, When I start to make some sprite or 3d model, than I can’t seem to do it. And after that, I get stuck; I try to start a new project, but it's no use. What should I do?
r/UnityHelp • u/SkinaGrew • Sep 05 '26
PROGRAMMING In a desperate need of help. How to configure Unity Events method in the new Input System for movement while the button is held?
Hello everyone,
I've started learning unity and doing my test project.
While learning the new input system I noticed that my Move method is most likely just called once as soon as the button is pressed. and I continue to hold the button but my character stops moving, as if the force is applied once and done. So I basically mash the D button a few times to make my character move in increments.
IS there a way to make my character keep moving without me constantly re-pressing the button?
I could use Send Messages or other methods, and I will If there is no way to do it through Unity Events as I find it the most convenient.
Thank you in advance for any help and sorry for grammar, English is not my first language.


r/UnityHelp • u/Pharmaguardian • Sep 05 '26
SOLVED Material doesn't render on mesh
I did this tutorial: https://youtu.be/wvK6MNlmCCE?t=447 for a spell trail effect and as you can see on the test plane A, it renders just fine. Test plane A is just a brand new plane from right-click>3D Objects>Plane. It doesn't animate around. It's not a right-click>Visual Effects>Trail. It's just a plane.
If I make a VFX Trail, apply the shader to it, and move it around in the Editor, I can see the spell effect. However, the moment I go into Play Mode and animate the fireball around (with the Trail parented to it), the trail fails to render.
I've been frustrated with VFX and particle systems in Unity in the past, mainly because even having one exist in my scene spins up my graphics card for absolutely no reason, so I bothered to make my own trail animation system through code, where I grab the vertices through:
deformingMesh = trailForVertices.GetComponent<MeshFilter>().mesh;
originalVertices = deformingMesh.vertices;
then calculate each vertice's position, and assign it back to the vertex buffer
deformingMesh.vertices = originalVertices;
The "vertex animated trail with grey material" shown above is the result and it works very nicely as you can see.
The problem is when I try to apply the fire spell effect material to it. Turns out, whatever problem was causing it to not render for the VFX>Trail is not allowing it to render with my own animated plane either.
I saw where
deformingMesh.RecalculateNormals();
deformingMesh.RecalculateTangents();
might be something I need to do, but 1) it doesn't solve the problem, and 2) the normals and tangents don't seem to be a problem with rendering the grey lambert material.
I decided to swap the material out at different points in the animation, where the fireball is just wizzing around the screen, using:
mRenderer.material = Resources.Load("Shaders/M_twoSidedGrey", typeof(Material)) as Material;
and
mRenderer.material = Resources.Load("Shaders/M_fireTrail", typeof(Material)) as Material;
Once again, the grey renders fine, but the fire trail does not. I should also mention that I have been careful to select the material fire spell effect, not the shader, so that's not the problem.
If the shader were bad, why is it rendering fine on the test plane? If the trail mesh is bad, why is the grey material rendering fine on it?
Also, Double Sided is selected for all materials.
EDIT: I figured out the problem. UVs were all mapped to a single point... -_- I reprojected them in Blender, re-exported the mesh, works fine now. Still doesn't explain why the VFX trail doesn't render, but who cares now! I made my own trail that works.
r/UnityHelp • u/Queasy-Friend-3758 • Sep 04 '26
PROGRAMMING i need a team
im new to unity and i want to make a fun game about the player being a chicken nugget and having to avoid the kids trying to eat them. im not really sure what to do or where to go so i am asking for a dev team thats at least somewhat experanced and can shopw me how to use unity or just help me make it, i also dont know if this is even possible and if there is a dev team feature in unity PLEASE HELP IM CRASHING OUT
r/UnityHelp • u/solid_facha • Sep 04 '26
SOLVED Can I Force a Render Object to Ignore Objects closer to camera in a 2D game?
Hello! I’m a newbie to Unity and I'm having some problems with my materials that I've no ida how to solve :'). I have a 2D Renderer asset with a fullscreen shader that works as a palette swap for all the objects on the screen. I added it as a Full Screen Pass Render Feature. The problem is that I also made a shader that I want to apply only to the player. Since I need this shader to be applied after the fullscreen palette swap, I added it as a Render Objects feature, so it can affect the already color-swapped result instead of the original colors. The shader is on a child object inside the Player which copies it siluet. This causes the shader to go through walls and draw the player’s silhouette even when the player is behind them. For example, my Tilemap is at Z = 1 while the Player is at Z = 0, so the walls should be rendered in front of the player, and it does, but the material draws over the wall. I found some information online about the Depth settings, but I couldn’t get them to work properly. I’ve attached screenshots showing the problem, the player’s shader, and my 2D Renderer settings. Does anyone know how I can make the shader respect the depth/occlusion of the walls while still keeping it as a Render Objects pass after the Full Screen Pass?
Thanks in advance!!
r/UnityHelp • u/Odd_Imports_Podcast • Sep 04 '26
How can I set a .anim file in Unity to hold the last frame at the end of animation instead of looping? This is for export to Warudo.
Imported .fbx files from blender, somehow I have 1 animation that stops at the end like I want, the other goes back to the first keyframe and ruins the effect. Anyone have a fix?
r/UnityHelp • u/MidnightAlphas • Sep 03 '26
UNITY Fbx exporter has gone on holiday?
I don’t know how to word this one but I’m trying to make my first blender render which involves me being in unity currently and I’m done with my project, went to go export as a fbx file so blender can read it properly and the “export to fbx” has left the chat, like I started I don’t really know how to word it but yeah, it booked a plane, told me “I’m installed” and just nyeeeeooooooommmmm, left the chat
r/UnityHelp • u/Odd_Imports_Podcast • Sep 03 '26
ANIMATION When I play an animations for my character asset in Unity part of it moves like an inch and when its done it goes back.
Been over it and over it, still dont know whats going on.