a blog about nothing

Script inherits from native type 'RigidBody2D', so it can't be assigned to an object of type: 'Node2D'


Getting this error while following this tutorial in Godot v4.0.1.

In my case, I had added Node2D. The fix was to right click on the problem node under scene and click Make Scene Root. And then delete Node2D.

Here is what diff looked like:

diff --git a/2d-game-tutorial/Mob.tscn b/2d-game-tutorial/Mob.tscn
index 9eb1630..e720d7f 100644
--- a/2d-game-tutorial/Mob.tscn
+++ b/2d-game-tutorial/Mob.tscn
@@ -48,20 +48,18 @@ animations = {
 radius = 36.0
 height = 100.0

-node name="Mob" type="Node2D"]
-script = ExtResource("1_73gb4")
-
-node name="RigidBody2D" type="RigidBody2D" parent="."]
+node name="RigidBody2D" type="RigidBody2D"]
 collision_mask = 0
 gravity_scale = 2.66454e-15
+script = ExtResource("1_73gb4")

-node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="RigidBody2D"]
+node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
 scale = Vector2(0.75, 0.75)
 sprite_frames = SubResource("SpriteFrames_c1yjy")
 animation = &"walk"

-node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
+node name="CollisionShape2D" type="CollisionShape2D" parent="."]
 rotation = 1.5708
 shape = SubResource("CapsuleShape2D_h1pjc")

-node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="RigidBody2D"]
+node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
Read more ⟶

The Role of Diet on the Gut Microbiome, Mood and Happiness – PubMed


The gut microbiome may be both helpful and harmful, and not only is it affected by diet, it has also been shown to affect mental health including personality, mood, anxiety and depression. In this clinical study we assessed dietary nutrient composition, mood, happiness, and the gut microbiome in ord … — Read on pubmed.ncbi.nlm.nih.gov/36993403/

Read more ⟶

Throwback: Skydiving in DFW


This was in 2011. More than 12 years ago. Still one of my favorite memory.

View from skydiving plane just before jumping Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas Skydiving in Dallas

Read more ⟶

Ask HN: Successful one-person online businesses? | Hacker News


Ask HN: Successful one-person online businesses? | Hacker News — Read on news.ycombinator.com/item

Read more ⟶

How NieR: Automata Tells the Ultimate Humanist Fable


Read more ⟶

Ask HN: Solo founders, How do you deal with self-doubt and being overwhelmed? | Hacker News


Ask HN: Solo founders, How do you deal with self-doubt and being overwhelmed? | Hacker News — Read on news.ycombinator.com/item

Read more ⟶

Ask HN: What books helped you in your entrepreneurship journey? | Hacker News


Ask HN: What books helped you in your entrepreneurship journey? | Hacker News — Read on news.ycombinator.com/item

Read more ⟶

Ask HN: What has your personal website/blog done for you? | Hacker News


Ask HN: What has your personal website/blog done for you? | Hacker News — Read on news.ycombinator.com/item

Read more ⟶

Ask HN: Any solo game developers here? | Hacker News


Ask HN: Any solo game developers here? | Hacker News — Read on news.ycombinator.com/item

Read more ⟶

Zayn's Words


Dada - Dolphin

DoDo - Shark

Kaka - Orca

Meow - Cat

Moo - Cow

Kaykey - sticker

Read more ⟶