Доработка. В процессе. Вращение в соответсвии с курсом
This commit is contained in:
@@ -152,7 +152,7 @@ func on_data_received(coords: Dictionary) -> void:
|
||||
if not is_centered:
|
||||
return
|
||||
if coords.has_all(['latitude', 'longitude']):
|
||||
set_coordinates(coords['longitude'], coords['latitude'])
|
||||
set_coordinates(coords['longitude'], coords['latitude'], coords['k'])
|
||||
|
||||
|
||||
func _on_resize() -> void:
|
||||
@@ -677,7 +677,7 @@ func clear() -> void:
|
||||
queue_redraw()
|
||||
|
||||
|
||||
func set_coordinates(lon: float, lat: float) -> void:
|
||||
func set_coordinates(lon: float, lat: float, course: float) -> void:
|
||||
var anim: Animation = $player.get_animation('goto')
|
||||
var new_pos: Vector2 = lonlat_to_world(lon, lat)
|
||||
anim.track_insert_key(0, 0, _xyz.x)
|
||||
@@ -690,7 +690,8 @@ func set_coordinates(lon: float, lat: float) -> void:
|
||||
ship_instance = ship_mark.instantiate()
|
||||
add_mark_from_lon_lat(ship_id, lon, lat, ship_instance, 0.0)
|
||||
else:
|
||||
_marks[ship_id].position = lonlat_to_world(lon, lat)
|
||||
ship_instance.position = lonlat_to_world(lon, lat)
|
||||
ship_instance.rotation_degrees = course - 90
|
||||
|
||||
|
||||
func blend_mask(val: bool) -> void:
|
||||
|
||||
Reference in New Issue
Block a user