Comments (9)
Thanks everyone for chiming in. I have asked the 3d modeler to remove the keys from the model's root, she provided me with new models which will soon be integrated on main
and art-assets
, which should fix this issue.
from open-project-1.
It seems like the issue is caused by animations. If I disable Animator
component on the PigChef
prefab the SpawnSystem
spawns player at the correct position.
from open-project-1.
One more observation: it seems like enabling the Apply Root Motion option in Animator
component panel on PigChef
prefab fixed the issue and didn't break the animations. I am not really sure why or if this a good fix. Let me know, I am happy to open a PR if this solution is good enough.
from open-project-1.
Sounds like an interesting thing that we definitely need to fix, but also understand why it happens and how can we prevent it.
I know that some animation clips have keyframes on position and rotation for the root, which generally I'd like to avoid.
Also a little heads-up. There's a setting in the Animator which can feel quite mystical :D called "Write Defaults". A short explanation.
Having it on/off can change a lot how a state machine behaves. It's all logical, but you need to be aware of its value (and each state can have a different value for it).
Let me know if it's not clear, I'll re-explain :)
And no PR needed for now, but I'll keep the issue open. Thanks a lot for it, @mtakac !!
from open-project-1.
Thanks for the explanation @ciro-unity. I didn't know about Write Defaults option. Sounds like it could come handy to be aware of it.
However I don't think this is related to this exact issue. If I understood correctly, Write Defaults option is relevant when destroying and the re-instantiating animated object, but that doesn't seem to be the case here. Also I verified that toggling it on various animation clips doesn't fix the issue, but I think you're right about the problem being in animations setting the position:
Unfortunately, I don't know enough about 3D animations in Unity to do anything about it, but would be interesting to see what happens if somebody updates animations to remove the position.
from open-project-1.
While checking Apply Root Motion allows the character to spawn at the desired location and walk around it's not without problems.
Changing settings on the Animator controller while playing, and with the Apply Root Motion off gets the desired behaviour, but entering Play Mode with the same settings gets a different, undesired, behaviour.
A video to demonstrate: https://youtu.be/DDoaKjf54KI
from open-project-1.
Greetings, I'm new to the project. After looking things over I noticed the animation(s) "keyframe" the position of the character. Removing the position keyframes from the animations (by duplicating them, then removing the position attribute, then retargeting the animator) has resolved this issue in my testing.
I am reluctant to call this a fix as I don't know what the big picture is for the animations. Currently, the animations are baked into the model and that is not my area of expertise.
from open-project-1.
this issue can be closed now
from open-project-1.
Thanks! And yes, we implemented the fix as described by @jandd661
from open-project-1.
Related Issues (20)
- Loading the currently loaded scene gives error. HOT 1
- NullReferenceException when entering dark red block HOT 4
- Build error: type or namespace name 'Localization' does not exist in the namespace 'UnityEditor' HOT 2
- Horizontal movement is stuck on rock
- Jumping into wall adds excessive speed
- First quest area to Field Hill can be missed HOT 1
- No collider on oven HOT 2
- Question: What about Assemblies?
- Question: Properly Loading with ScriptableObjects and its Events
- Cannot Play the Game with Unity 2020.3.26f1 LTS Due to Addressable Errors
- Opening State Machine Editor Window crashes Unity in 2021.2.9 and newer HOT 1
- Audio Save System Bug
- Loading screen does not support 21:9 screens
- Character stuck inside the tree
- I cant open the ZIP file HOT 1
- Shader error: Invalid subscript 'shadowCoord' when try build for mac
- Operation Suggest
- New game template?
- Cannot Analyze Addressable in project with Unity 2022.3.5f1 LTS
- 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open-project-1.