CollisionShape3D Moving Randomly in Godot 4
Asked Answered
M

19

0

Recently Ive been trying to build 3D characters in Godot and have been running into a really frustrating issue where on closing and reopening the program my CollisionShape3D nodes that are attached to a skeleton will have moved to completely random locations. I can fix them by using positioning and rotation and the it looks fine but then Ill restart the program again and theyll be in all new locations. I am properly saving and it also doesnt happen every restart but at least once every 3-5.

This is what my nodes look like

This is a how it looks when I first place the shapes

This whole 3D animation process is really confusing to me so I could be doing something wrong and Id appreciate any help or ideas. Thanks!

Mcbryde answered 7/11, 2023 at 14:19 Comment(0)
B
0

Mcbryde I am properly saving and it also doesnt happen every restart but at least once every 3-5.

Do you have CollisionShape3D scaled? Can you share a scene with the problem?

Berry answered 7/11, 2023 at 15:52 Comment(0)
M
0

Berry I do have all the shapes scaled, how do I share a scene on these forums with the upload cap and the dependancies?

Mcbryde answered 7/11, 2023 at 16:48 Comment(0)
B
0

Mcbryde Try doing it without scaling.

Usually use file sharing sites here.

Berry answered 7/11, 2023 at 17:2 Comment(0)
M
0

Berry okay Im pretty convinced this is just a really annoying glitch. I pulled out the scene and the 3 dependencies and it loaded up fine but if you quit while the animation is playing or if the animation is paused at anything other than the starting keyframe it breaks all the shapes. Extremely irritating but ¯_(ツ)_/¯.

Heres the scene and dependencies.

Mcbryde answered 7/11, 2023 at 17:54 Comment(0)
B
0

Mcbryde Heres the scene and dependencies.

Yeah, there's a problem. A warning is issued, but maybe it's unrelated.

To reproduce the problem, it is necessary to save the scene when performing animation in the process (not on the first frame), close and reopen the scene.

Perhaps it makes sense to create a issue, having checked whether there is already such a problem.

But why make such a complex shape — isn't a simple capsule enough?

Berry answered 7/11, 2023 at 18:43 Comment(0)
M
0

Berry Well I want to create different damage values for the different shapes head, body, and leg/limb. I think that warning is unrelated. I'm surprised no one else has run into this issue because I got this method of mapping the shapes to bones from a tutorial so its not like Im the only one to do this.

Mcbryde answered 7/11, 2023 at 18:56 Comment(0)
B
0

Mcbryde Well I want to create different damage values for the different shapes head, body, and leg/limb.

Yeah, in that case it makes sense.

I think that warning is unrelated.

I also think that this warning is unlikely to be related, but could "provoke" this behavior.

In Godot_v4.2-beta5 this problem persists.

I got this method of mapping the shapes to bones from a tutorial

What kind of tutorial is this?

Berry answered 7/11, 2023 at 19:3 Comment(0)
M
0

Berry It was a tutorial on 3D pathfinding and animations here. I pretty much copied exactly except for using a different character because I was trying to understand how it worked in godot.

Mcbryde answered 8/11, 2023 at 12:40 Comment(0)
M
0

Berry I also just found out that the problem can happen even if you save and quit on the first keyframe so it seems like theres nothing I can do its just always broken 🙂

Im gonna try disabling this idk might be related to my issue its on by default

Mcbryde answered 8/11, 2023 at 13:11 Comment(0)
M
0

Mcbryde well I didnt even exit the program just switched scenes and came back to this so I think its safe to say its back to Unity for me lol

Mcbryde answered 8/11, 2023 at 13:34 Comment(0)
B
0

Mcbryde well I didnt even exit the program just switched scenes and came back to this

Yeah, this is not normal behavior. It would be good to create a issue.

About the video tutorials. The fact that it has warnings () is not good. You need to get rid of them in the project — they are potential problems. YouTube, first of all, is an advertising platform and you should treat it accordingly — with caution. They pay for the number of views. And it is often achieved to the detriment of quality.

Berry answered 8/11, 2023 at 22:31 Comment(0)
G
0

im having the exact same problem with the same model, with the same tutorial.
I suspect that it's because at some point in the tutorial he said to delete the bones that aren't used. I think i should've just deleted the unused collisionshapes.
I haven't tested tho, it's just a tutorial. I'll try to fix it if i become invested in the game lol

Ingenerate do you know how to fix the warning? resetting the scale on each bone doesn't seem to work. The warning is maintained, and after a while the scale changes again.

Greeneyed answered 30/11, 2023 at 18:7 Comment(0)
B
0

Greeneyed do you know how to fix the warning? resetting the scale on each bone doesn't seem to work. The warning is maintained, and after a while the scale changes again.

Yep, when you restore the scaling, it doesn't reset all the warnings there — only some of them. And that's a flaw in the lesson. I will investigate this, but it will take a noticeable amount of time. Very noticeable time.

Berry answered 30/11, 2023 at 19:29 Comment(0)
G
0

Berry
in the next video he finds a fix. in this case, we have to do it manually. In the first one, we used godot's physical skeleton feature which doesn't seem to work well

Greeneyed answered 1/12, 2023 at 1:56 Comment(0)
B
0

Greeneyed in the next video he finds a fix.

And that's what I also don't like video tutorials for. If an article can be corrected, what do you do with a video if mistakes are found in it?

Berry answered 1/12, 2023 at 10:1 Comment(0)
R
0

hello, you can try this code under the ready function $YourSkeletonPath.animate_physical_bones = true

Reiterate answered 1/12, 2023 at 13:4 Comment(0)
G
0

Berry
You make another video, you make a pinned comment mentioning it, you write a fix in the description, and you look thru the comments to look for other people with the solution. On the way to find the solution. you discover better ways to do what you want

If it wasn't for these video tutorials, most people wouldnt even touch stuff like this. I know i wouldn't
I quit a programing course in school ¾'s of the way because i didn't care about i, now im sitting here learning exactly what i want for fun

Greeneyed answered 1/12, 2023 at 21:52 Comment(0)
G
0

Reiterate

The way i solved it was by creating a BoneAttachment node and an area to it and a collisionshape to that.
Worked like a charm

Greeneyed answered 1/12, 2023 at 21:54 Comment(0)
B
0

Greeneyed You make another video, you make a pinned comment mentioning it, you write a fix in the description, and you look thru the comments to look for other people with the solution.

For some reason, this is extremely rare. What advantages it has over a regular article are not clear.

Berry answered 1/12, 2023 at 23:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.