How to correctly use orientation field in function rendering.draw_sprite()?

Place to get help with not working mods / modding interface.
Post Reply
yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

How to correctly use orientation field in function rendering.draw_sprite()?

Post by yagaodirac »

rendering.draw_sprite{surface = self.surface, sprite = self.sprite, target = self.pos, orientation = ***no matter what number I tried, it doesn't make any difference***, time_to_live = 2, x_scale =0.25, y_scale = 0.25}

The sprite does show. But this field doesn't seem to have done anything. What is wrong?

Thanks.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: How to correctly use orientation field in function rendering.draw_sprite()?

Post by DaveMcW »

Code: Select all

/c rendering.draw_sprite{
  surface = game.player.surface,
  sprite = "item/electronic-circuit",
  target = game.player.character,
  orientation = 0.1,
  time_to_live = 2 * 60,
  x_scale = 0.25,
  y_scale = 0.25
}

yagaodirac
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Jun 16, 2019 4:04 pm
Contact:

Re: How to correctly use orientation field in function rendering.draw_sprite()?

Post by yagaodirac »

DaveMcW wrote:
Fri Dec 11, 2020 4:08 am
Yeah, thank you. It works.

Post Reply

Return to “Modding help”