Skip to content

Commit

Permalink
Set the default orientation to NORTH for objects that have no orienta…
Browse files Browse the repository at this point in the history
…tion defined.

PiperOrigin-RevId: 545436008
Change-Id: Ibb5b177c09975d5946a5e862b17e37c8739b7715
  • Loading branch information
duenez authored and copybara-github committed Jul 4, 2023
1 parent baf2f70 commit 68a27da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion meltingpot/python/utils/substrates/game_object_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ def _create_game_object(
go_transform = get_first_named_component(game_object, "Transform")
go_transform["kwargs"] = {
"position": (transform.position.x, transform.position.y),
"orientation": transform.orientation.value,
"orientation": (transform.orientation.value
if transform.orientation is not None
else Orientation.NORTH.value),
}
return game_object

Expand Down

0 comments on commit 68a27da

Please sign in to comment.