"I'm gonna be an astronaut when I grow up!" my son said while drawing with his crayons.
"Of course you will," I replied sadly, keeping his attention focused on his drawing and not on the imminent planetary collision.
In this archive from Sep 2023 to Mar 2026
"Of course you will," I replied sadly, keeping his attention focused on his drawing and not on the imminent planetary collision.
I'm trying to use a translate command to move an AnimatedSprite2D (which I assume is possible since it has a Transform). However, when I try to move it with this command: player.transform.translate(Vector2.RIGHT * movespeed * delta) ...I get the error: Invalid call. Nonexistent function 'translate'...
Alright, but how? Does each player need to be on a separate layer? And what node do I use for the projectile to ensure that it can still collide with other projectiles?
So I can tell which side is being interacted with. If it was only one, it would register the same raycast collision regardless of which side the player is on. And I don't want to have it use the player's position relative to it, because the orientation of the object could change. With one on each side, I pick up which one the raycast hits and use the interaction with that side.
Basically it's a flat wall segment that can be interacted with on either side for two separate interactions. At the root of it is a simple Node3D, whichis what the two StaticBody3D's are attached to. There's a script on the Node3D which is used for positioning the object, storing relevant variables, etc. When the player gets close to the wall from one side, a raycast interacts with the static body on that side, which then needs to access and return information from the Node3D's script.
I know it's bad practice to use get_parent(), but I don't know of an easier way to reference the Node3D's script without putting extra scripts on each of the two StaticBody3D's that point back to it, which seems inefficient.
Will areas collide with other areas? I thought it needed a body to collide with?
Decals are probably the quickest and easiest way to accomplish what I'm trying to do. Thanks for the suggestion!