6/1/2023 0 Comments Angry bots unity camera angleI form a diamond with a cross in the middle. I have a blend tree that works good for movement anywhere between East North and West (havent gotten to southern directions yet). I'd love it if someone would provide a controller and the code for input using mecanim that does basic WASD motion as seen in the Bootcamp demo. But no strafing.Īnd that's because if you try to combine strafing on the horizontal axis with forwards and backwards on the vertical axis in the same blend tree, the blend system has to pass through the strafe horizontal states in order to get to the vertical states and you see glitches in the animation. ![]() The forwards blend has blending for running right, straight and left forwards. They use one state for backwards and a seperate state/blend tree for forwards. I also find it a little odd that in the Mecanim demos and tutorials they do provide, the character movement is some weird variation that you would never use in a game. I could be wrong but I have not seen any demo or tutorial using Mecanim that replicates what is provided in the Bootcamp demo (proper WASD motion). Until that happens, I'm not sure you can even achieve the Bootcamp demo character WASD motion. According to the last Ninja Camp, they showed a video of them working on Blend Trees that allow 2 variables or 2 axis for blending. ![]() My best guess is Mecanim can't actually do correct WASD motion in it's current version because it can only blend one axis (either Horizontal or Vertical) but not both in a blend tree. Well let me know if you find a solution but I think the problem is the scripting not the blending. Instead they give examples of a guy running with a weird tight turn that no one would ever use in a real game. It's so strange because that's the most basic control setup but the Mecanim demos and tutorial examples all somehow avoid a basic FPS or third person controller setup with no strafing. I've been searching the asset store and as many mecanim examples as I can find but I have yet to find a Animator Controller and script that uses strafe left/right blended together with Walk forward and backward. It appears that for a humanoid character, we need a different equation but I don't know what it is yet. It only works if you are switching axis from vertical to horizontal but not horizontal to horizontal or vert to vert. Instead it makes an abrupt full switch from -90 to 90. I believe the problem is that the equation does not smoothly transition from -90 to 90, for example as you go left to right. However it works fine if you got up to right to down to left back to up in a circular sequence. It does not transition smoothly at all if you arrow up to down or right to left and visa versa. When you transition from left strafe to right strafe, there is a terrible glitch or blip in the animation. The following direction equation used in the minebot script is the source of the problem.I think:Īvatar.SetFloat("Direction", Mathf.Atan2(h,v) * 180.0f / 3.14159f) I believe I know what the problem is but I don t know how to fix it. If you have any feedback or issues when using the project please contact Andy by email: andytunit圓d.I'm dealing with this exact issue as well right now. This is a 'live' project meaning that assets, feature-usage, code, etc will likely be updated, changed and added in the future!įeel free to use anything from this project for whatever you are working on assets, code, shader graphs, etc! UI: For a Debug Menu for toggling settings at runtime: FPS Display, Post Processing, LWRP Low/Medium/High Quality Assets.Post Processing: FXAA, Bloom, Chromatic Aberration, Color Grading, Vignette.Prefab Workflows: Nested Prefabs for some objects such as the Player's Gun, Light Shards, etc.VFX: Shader Graph for environment effects such as Hose Extrusion, Emission Cycle, Hologram Glitch Effect.Camera: Cinemachine to follow the Player.Lighting: Scene Ambient, Realtime Directional & Additional Lights, Realtime Shadows, Reflection Probes. ![]() Realtime Planar Reflections and Blue Refraction Render Pass scripts are included in the project.
0 Comments
Leave a Reply. |