#All my weapon meshes turned invisible following this tutorial

1 messages · Page 1 of 1 (latest)

frigid swallow
#

Hi all! Recently started working in Godot following this tutorial: https://www.youtube.com/watch?v=hND2zO_tXQ4&t=159s&ab_channel=StayAtHomeDev

Everything has been going great but at this episode suddenly all my meshes turned invisible, not getting any errors except for this endless error: core/math/basis.cpp:47 - Condition "det == 0" is true. (which i think is unrelated) anyone know what's up? Maybe someone has followed this tutorial as well. Thanks.

In this tutorial, we're adding a procedural recoil (position) to our weapon that is easy to customize.

🔥 GET THE SOURCE FILES ►► https://www.patreon.com/StayAtHomeDev_
👉🏼 FREE BASIC FPS SETUP SOURCE FILES ►► https://github.com/StayAtHomeDev-Git/FPS-Godot-Basic-Setup

PART 1 ►► https://youtu.be/adbk8hTfRVM

------------------------------------...

▶ Play video
white walrus
#

If you don't provide the relevant code, it will be difficult for us to help you

frigid swallow
#

Hey thanks, I'm not sure what the problem is exactly since I'm not getting an error but I will try to provide some context

#

The mesh is supposed to show up there, but it's not.

#

This is where I pull the data from a weapon resource

#

Line 44 is relevant for the mesh

#

Weapons disappeared when I made the WeaponMesh (first photo) a child of the RecoilAnimation

#

This is the RecoilAnimation code

#

First time asking something like this and talking to someone about coding so please let me know if this helps or not 🙂

frigid swallow
# frigid swallow

Am getting some error here obviously though, but no clue about those 😆

#

Ah now I'm getting: res://Weapons/init_weapon.gd:44 - Invalid assignment of property or key 'mesh' with value of type 'ArrayMesh' on a base object of type 'Nil'.

white walrus
#

Sry,Could you provide me the code for the error message res://Weapons/init_weapon.gd:44 - Invalid assignmen?

frigid swallow
#

I assign the Mesh on the bottom right there

#

I can share the project if you got time to look at it and if it makes it easier

regal bear
#

weapon_mesh is null
Seems it is not properly set beforehand.

frigid swallow
#

As far as I can tell it's set everywhere, now I can play and don't get the same error about the mesh

#

That's why I'm scratching my head here, I don't know how I'm assigning it wrong

#

Still getting the error nevermind

#

How would I properly set it?

regal bear
#

I don't even know how you're setting it right now.
But there's a lot of ways to do it.

It can be an @export variable, you can fetch it from a singleton, using @onready, etc.

frigid swallow
#

I'm setting it in a resource and then using that resource information, it worked for a good while and then suddenly all the meshes turned invisible. Been replacing them and trying everything I can but I can't get them to view again

#

The project is pretty small, maybe you can take a look? 😇

regal bear
#

I mean, the issue is clearly that wherever you are taking it from doesn't have it set anymore.

white walrus
#

Maybe you can continue. I checked your project and there is no error every time you start the game. I guess the reason for this error in the scene is probably related to @tool and the code shown in the picture below. I have followed this tutorial and indeed there were many errors in the process, but they will not affect the goal. So maybe you can continue. If the goal can be achieved, then you can ignore the current error.

frigid swallow
#

Thanks Mace, yes everything is working apart from the meshes not showing, tutorial was pretty hard to follow at times but I'm happy with the result apart from the issue now. I wanna continue building my game from this base so it needs the meshes to show as well, was almost at the point where I wanna model another gun and stuff but than this happened 😅

#

Did you find anything related to the meshes not showing?

white walrus
#

Sry,I was careless, I saw your grid disappeared

frigid swallow
#

What do you mean?

white walrus
#

I remember that when writing the load_wepon function in this tutorial, the blogger demonstrated your situation, the grid disappeared, and then he demonstrated how to solve this problem in the video. Maybe you can review the previous tutorial

frigid swallow
#

Hmm I will check some of the previous tutorials again to see if I can find what you're talking about, thanks so far!

#

Any idea what this means? core/math/basis.cpp:47 - Condition "det == 0" is true.

#

Keeps going endlessly basically

frigid swallow
#

Rewatched everything a lot of times by this point but I just can't get it to work again, don't see the issue you mentioned in the video's

#

Might have to scrap this since it's going over my head