#Get Rotation Of Parent

9 messages · Page 1 of 1 (latest)

livid wraith
#

how do i get the rotation of the parent of a sprite?

earnest tendon
#

If you have a Node you should be able to call get_parent() to get the parent node. Does that work?
Then you should be able to just access the rotation or rotation_degrees property.

livid wraith
#

I called get_parent() but it said rotation was invalid inside the () and with a . after

earnest tendon
#

Could you share a screenshot?

pure wasp
#

did you put the rotation inside he brackets?

livid wraith
livid wraith
limpid trail
#

Setting the rotation when spawning the bullet would be a better/more reliable method.

var Bullet = Scene.instance()
Bullet.rotation = self.rotation
get_parent().add_child(Bullet)