setRelativeOffset method

void setRelativeOffset(
  1. Anchor newRelativeOffset
)
inherited

This will trigger a smooth transition to a new relative offset.

You can use this for example to change camera modes in your game, maybe you have two different options for the player to choose or your have a "dialog" camera that puts the player in a better place to show the dialog UI.

Implementation

void setRelativeOffset(Anchor newRelativeOffset) {
  _targetRelativeOffset.setFrom(newRelativeOffset.toVector2());
}