Does not have any property called 'rotation' in defold

please help me i am new in defold…
go.get(“player#sprite”, “rotation”)

1 Like

Hello and welcome to the community!

Yeah, sadly, the sprite component does not have property “rotation” exposed through go.get() which is a game object handling API (hence go).

But you can get the rotation of the game object that contains your sprite:

go.get(“player”, “rotation”)

If you want the player to be separated from sprite (have different rotation for player game object and different for sprite) - add sprite under another game object, e.g. visual:

  • player (game object)
    • visual (game object)
      • sprite (sprite component)
5 Likes

Ok I’ll give it a try. sorry for my English as I don’t speak English