Hi! Very new to godot. Trying to remake flappy bird. I made 2 scenes, for player and for pipe (trees attached. I used Node2D because when I tried to scale "RigidBody2D" I got "..will be overriden by physics engine", and scalling manually both collision and sprite sounds wrong.), Then I put them in another scene (img.3). Attached script to RigidBody2D in Player (img.4). Attached signal (img.5). When running the scene bird falls, and i'm able to jump with "space", but OnBodyEntered seems to not trigger. Also for some reason bird seems to rotate only once, like if i would use = instead of +/-=.
#Collision not not?
1 messages · Page 1 of 1 (latest)
did you scale the node2d?
That counts as scaling the rigidbody2d as well
since the children inherit the parent's scale
i know you don't want to scale the sprite and the collision separately but it's kinda what you have to do
I don't think so
the sprite should be scaled and the collision shape should not, you should instead change the size properties of it
i think i scaled rigidbody2d
when you click on the node2d, what is the scale property?
okay
anyway, the pipe is an area right?
so the onbodyentered function will not detect it
it's an area, not a body
oh.
usually detections like this work in the reverse, the area is the one detecting the body
so the player would be an area instead of the pipe
is there any way for player to detect area instead?
also, you are rotating the bird 30 degrees every frame
only if the player is an area itself
well it doesn't rotate..
rigidbody2d does not have any signals for detecting areas
maybe it's rotating so fast you can't see it?
i'm sure that no
i'll try setting it lower
definitly no
it acts like if i would use =
maybe something overrides that after render
like physics engine?