{"id":354985,"date":"2024-05-20T22:59:24","date_gmt":"2024-05-20T22:59:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=354985"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=354985","title":{"rendered":"<span>\u0420\u0430\u0431\u043e\u0442\u0430 \u0432 Unreal Engine 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e GPT<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/fb6\/f20\/fbc\/fb6f20fbc92f7e9962d3d9ed6f6413b4.jpg\" width=\"1280\" height=\"698\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fb6\/f20\/fbc\/fb6f20fbc92f7e9962d3d9ed6f6413b4.jpg\" data-blurred=\"true\"\/><\/figure>\n<div class=\"persona\" persona=\"true\"><img decoding=\"async\" persona=\"true\" class=\"image persona__image\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/6f6\/94d\/e66\/6f694de66a0aac7649016f8f08973444.jpg\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6f6\/94d\/e66\/6f694de66a0aac7649016f8f08973444.jpg\" data-blurred=\"true\"\/><\/p>\n<h5 class=\"persona__heading\" persona=\"true\">\u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438: \u0420\u043e\u0441\u0442\u0438\u0441\u043b\u0430\u0432 \u041c\u0443\u0441\u0438\u0435\u043d\u043a\u043e<\/h5>\n<p>Senior Unreal Engine Developer \u0432 District Zero  <\/p>\n<\/div>\n<p>\u0412\u0441\u0435 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0438\u0433\u0440\u043e\u0432\u044b\u043c \u0434\u0432\u0438\u0436\u043a\u043e\u043c Unreal Engine 5. \u0418 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438\u043b\u0438 \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043e GPT chat. \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 C++ \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 Unreal Engine<\/p>\n<p>\u0420\u0435\u0448\u0438\u043b \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0435\u0440\u044c \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436, \u0441\u0434\u0435\u043b\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3da\/4b3\/bab\/3da4b3babcba7f8db2a11bc22a82f35f.png\" width=\"570\" height=\"78\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3da\/4b3\/bab\/3da4b3babcba7f8db2a11bc22a82f35f.png\"\/><\/figure>\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442 \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.<\/p>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>MyActorDoor.cpp<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">#include \"MyActorDoor.h\" #include \"Components\/StaticMeshComponent.h\" #include \"GameFramework\/Actor.h\"  AMyActorDoor::AMyActorDoor() {     \/\/ Set this actor to call Tick() every frame.     PrimaryActorTick.bCanEverTick = true;      \/\/ Create the static mesh component for the door     DoorMesh = CreateDefaultSubobject&lt;UStaticMeshComponent>(TEXT(\"DoorMesh\"));     RootComponent = DoorMesh;      \/\/ Set the default door rotation     TargetRotation = FRotator(0.f, 90.f, 0.f); }  void AMyActorDoor::BeginPlay() {     Super::BeginPlay(); }  void AMyActorDoor::Tick(float DeltaTime) {     Super::Tick(DeltaTime);      \/\/ If the door should be opened, interpolate the rotation     if (bShouldOpen)     {         FRotator CurrentRotation = DoorMesh->GetComponentRotation();         FRotator NewRotation = FMath::RInterpTo(CurrentRotation, TargetRotation, DeltaTime, 2.f);         DoorMesh->SetWorldRotation(NewRotation);          \/\/ Check if the door is fully opened         if (CurrentRotation.Equals(TargetRotation, 1.f))         {             bShouldOpen = false;         }     } }  void AMyActorDoor::OpenDoor() {     bShouldOpen = true; } <\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>MyActorDoor.h<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">#pragma once  #include \"CoreMinimal.h\" #include \"GameFramework\/Actor.h\" #include \"MyActorDoor.generated.h\"  UCLASS() class GPT_TEST_API AMyActorDoor : public AActor {     GENERATED_BODY()  public:     \/\/ Sets default values for this actor's properties     AMyActorDoor();      \/\/ Called every frame     virtual void Tick(float DeltaTime) override;      \/\/ Function to open the door     UFUNCTION(BlueprintCallable, Category = \"Door\")     void OpenDoor();  protected:     \/\/ Called when the game starts or when spawned     virtual void BeginPlay() override;  private:     \/\/ Static mesh component for the door     UPROPERTY(VisibleAnywhere)     UStaticMeshComponent* DoorMesh;      \/\/ The target rotation for the door when it's fully opened     FRotator TargetRotation;      \/\/ Flag to determine if the door should be opened     bool bShouldOpen; }; <\/code><\/pre>\n<p>\u0423\u0432\u0438\u0434\u0435\u0432 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u043f\u0440\u043e\u043b\u043e\u0436\u0438\u043b \u0447\u0430\u0442, \u044f \u0431\u044b\u043b \u0432\u043e\u043e\u0434\u0443\u0448\u0435\u0432\u043b\u0435\u043d. \u041e\u043d \u043f\u043e\u043d\u0438\u043c\u0430\u043b \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438 \u0441\u0432\u044f\u0437\u0438 \u0432 \u0434\u0432\u0438\u0436\u043a\u0435 \u0430 \u0442\u0430\u043a \u0436\u0435 \u0431\u044b\u043b \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c.<br \/>\u0414\u0430\u043b\u0435\u0435, \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u044f \u043a\u043b\u0430\u0441\u0441 \u0432 \u0431\u043b\u0443\u043f\u0440\u0438\u043d\u0442 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043c\u0435\u0448 \u0434\u0432\u0435\u0440\u0438 \u044f \u043f\u043e\u0448\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c.<br \/>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043e\u043d \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0434\u0432\u0435\u0440\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f2a\/0d6\/333\/f2a0d63336d23306e568f955259b4811.png\" width=\"1207\" height=\"610\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f2a\/0d6\/333\/f2a0d63336d23306e568f955259b4811.png\"\/><\/figure>\n<p>\u042f \u043f\u043e\u043d\u044f\u043b \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c, \u0438 \u0434\u0430\u043b\u0435\u0435 \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u0430\u043a \u043b\u0435\u0433\u043a\u043e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2c2\/75e\/52f\/2c275e52fd1666264784520981868f11.png\" width=\"550\" height=\"61\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2c2\/75e\/52f\/2c275e52fd1666264784520981868f11.png\"\/><\/figure>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0432 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u0441\u0435 \u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c, \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0446\u0435\u043b\u044c\u044e \u0431\u044b\u043b\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0447\u0430\u0442\u0430 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u043a\u043e\u0434.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c1e\/b5b\/222\/c1eb5b2224640bcbaded96757d1c05fa.png\" width=\"550\" height=\"58\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c1e\/b5b\/222\/c1eb5b2224640bcbaded96757d1c05fa.png\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d58\/7ca\/4aa\/d587ca4aaf15da514fce606c393ad989.png\" width=\"510\" height=\"205\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d58\/7ca\/4aa\/d587ca4aaf15da514fce606c393ad989.png\"\/><\/figure>\n<p>\u041e\u043d \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b \u043e\u0431\u0440\u044b\u0432\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0aa\/f55\/5b2\/0aaf555b2c72eb139bf2c26e74f0bb54.png\" width=\"558\" height=\"86\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0aa\/f55\/5b2\/0aaf555b2c72eb139bf2c26e74f0bb54.png\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/424\/6e6\/025\/4246e6025e197644eb15a5654139c089.png\" width=\"500\" height=\"255\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/424\/6e6\/025\/4246e6025e197644eb15a5654139c089.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1e9\/325\/5ab\/1e93255abadb66e9fe6af073464fa192.png\" width=\"553\" height=\"83\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1e9\/325\/5ab\/1e93255abadb66e9fe6af073464fa192.png\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c6d\/67a\/78d\/c6d67a78d515e583316ebd45fbadfa88.png\" width=\"458\" height=\"413\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c6d\/67a\/78d\/c6d67a78d515e583316ebd45fbadfa88.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/287\/77d\/773\/28777d773c4e0c7f3885612e3b0434a9.png\" width=\"590\" height=\"81\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/287\/77d\/773\/28777d773c4e0c7f3885612e3b0434a9.png\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/866\/285\/532\/8662855324716ffc0482d90e66f45990.png\" width=\"503\" height=\"203\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/866\/285\/532\/8662855324716ffc0482d90e66f45990.png\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0440\u0435\u0434\u044b \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043a\u043e\u0434 \u0441\u043d\u043e\u0432\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0438 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c.<br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043a\u0430\u043a \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u043b \u0434\u0432\u0435\u0440\u044c \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436 \u043a \u043d\u0435\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b. <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0430, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0442\u0443\u0440\u0435\u043b\u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0438\u0433\u0440\u043e\u043a\u043e\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/595\/f25\/3f3\/595f253f31cf23f7a27ee169998912de.png\" width=\"605\" height=\"141\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/595\/f25\/3f3\/595f253f31cf23f7a27ee169998912de.png\"\/><\/figure>\n<p>\u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u043b \u0432\u044b\u0441\u043b\u0430\u043d \u0442\u043e\u043b\u044c\u043a\u043e <code>.cpp<\/code> \u043a\u043e\u0434 \u0438 \u0434\u0430\u0436\u0435 \u0432 \u043d\u0435\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043b\u043e\u0433\u0438\u043a\u0438 \u0434\u043b\u044f \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u043b\u043e\u0433\u0438\u043a\u0438 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u044b \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0441\u043d\u0430\u0440\u044f\u0434\u043e\u0432 \u0438\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u0430)<\/p>\n<pre><code class=\"cpp\">#include \"TurretActor.h\" #include \"GameFramework\/SpringArmComponent.h\" #include \"Camera\/CameraComponent.h\" #include \"Kismet\/GameplayStatics.h\" #include \"Components\/BoxComponent.h\" #include \"Components\/StaticMeshComponent.h\" #include \"TimerManager.h\"  \/\/ Sets default values ATurretActor::ATurretActor() {     \/\/ Set this actor to call Tick() every frame.     PrimaryActorTick.bCanEverTick = true;      \/\/ Create the base mesh component     BaseMesh = CreateDefaultSubobject&lt;UStaticMeshComponent>(TEXT(\"BaseMesh\"));     RootComponent = BaseMesh;      \/\/ Create the turret mesh component     TurretMesh = CreateDefaultSubobject&lt;UStaticMeshComponent>(TEXT(\"TurretMesh\"));     TurretMesh->SetupAttachment(BaseMesh);      \/\/ Create the gun mesh component     GunMesh = CreateDefaultSubobject&lt;UStaticMeshComponent>(TEXT(\"GunMesh\"));     GunMesh->SetupAttachment(TurretMesh);      \/\/ Create the collision box for player detection     PlayerDetectionBox = CreateDefaultSubobject&lt;UBoxComponent>(TEXT(\"PlayerDetectionBox\"));     PlayerDetectionBox->SetupAttachment(GunMesh);      \/\/ Set up initial rotation values     BaseRotationSpeed = 20.0f;     TurretRotationSpeed = 10.0f;     GunRotationSpeed = 5.0f;      \/\/ Set up the delay between shots and shooting range     ShootDelay = 2.0f;     ShootingRange = 1000.0f; }  \/\/ Called when the game starts or when spawned void ATurretActor::BeginPlay() {     Super::BeginPlay();      \/\/ Set up the player character reference     ACharacter* PlayerCharacter = UGameplayStatics::GetPlayerCharacter(GetWorld(), 0);     if (PlayerCharacter)     {         PlayerCharacterRef = PlayerCharacter;     }      \/\/ Start the shooting timer     GetWorldTimerManager().SetTimer(ShootTimerHandle, this, &amp;ATurretActor::Shoot, ShootDelay, true); }  \/\/ Called every frame void ATurretActor::Tick(float DeltaTime) {     Super::Tick(DeltaTime);      \/\/ Rotate the turret base towards the player     if (PlayerCharacterRef)     {         FVector PlayerLocation = PlayerCharacterRef->GetActorLocation();         FVector TurretLocation = TurretMesh->GetComponentLocation();         FRotator LookAtRotation = (PlayerLocation - TurretLocation).Rotation();         FRotator BaseRotation = FRotator(0.f, LookAtRotation.Yaw, 0.f); \/\/ Only yaw rotation          FRotator NewBaseRotation = FMath::RInterpTo(BaseMesh->GetComponentRotation(), BaseRotation, DeltaTime, BaseRotationSpeed);         BaseMesh->SetWorldRotation(NewBaseRotation);          \/\/ Rotate the turret towards the player         FRotator NewTurretRotation = FMath::RInterpTo(TurretMesh->GetComponentRotation(), LookAtRotation, DeltaTime, TurretRotationSpeed);         TurretMesh->SetWorldRotation(NewTurretRotation);          \/\/ Rotate the gun towards the player         FRotator GunLookAtRotation = (PlayerLocation - GunMesh->GetComponentLocation()).Rotation();         FRotator NewGunRotation = FMath::RInterpTo(GunMesh->GetComponentRotation(), GunLookAtRotation, DeltaTime, GunRotationSpeed);         GunMesh->SetWorldRotation(NewGunRotation);          \/\/ Check if the turret is facing the player and within shooting range         FVector ToPlayer = PlayerLocation - GunMesh->GetComponentLocation();         float DotProduct = FVector::DotProduct(ToPlayer.GetSafeNormal(), GunMesh->GetForwardVector());         if (DotProduct > 0.99f &amp;&amp; ToPlayer.Size() &lt;= ShootingRange)         {             \/\/ Fire when facing the player             Shoot();         }     } }  void ATurretActor::Shoot() {     \/\/ Implement your shooting logic here     \/\/ You can spawn projectiles or apply damage to the player, for example }  \/\/ Other functions and logic can be added as needed <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0445\u043e\u0442\u044f \u0431\u044b \u0442\u043e\u0433\u043e \u043a\u043e\u0433\u0434\u0430, \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0444\u0430\u0439\u043b\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432, \u0438 \u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u043b<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8c8\/dca\/0cd\/8c8dca0cd1f8e5469d66623679fc5324.png\" width=\"568\" height=\"63\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8c8\/dca\/0cd\/8c8dca0cd1f8e5469d66623679fc5324.png\"\/><\/figure>\n<pre><code class=\"cpp\">#pragma once  #include \"CoreMinimal.h\" #include \"GameFramework\/Actor.h\" #include \"TurretActor.generated.h\"  UCLASS() class GPT_TEST_API ATurretActor : public AActor {     GENERATED_BODY()  public:     \/\/ Sets default values for this actor's properties     ATurretActor();  protected:     \/\/ Called when the game starts or when spawned     virtual void BeginPlay() override;  public:     \/\/ Called every frame     virtual void Tick(float DeltaTime) override;  private:     \/\/ Base mesh component     UPROPERTY(VisibleAnywhere)     UStaticMeshComponent* BaseMesh;      \/\/ Turret mesh component     UPROPERTY(VisibleAnywhere)     UStaticMeshComponent* TurretMesh;      \/\/ Gun mesh component     UPROPERTY(VisibleAnywhere)     UStaticMeshComponent* GunMesh;      \/\/ Collision box for player detection     UPROPERTY(VisibleAnywhere)     UBoxComponent* PlayerDetectionBox;      \/\/ Player character reference     ACharacter* PlayerCharacterRef;      \/\/ Rotation speeds     UPROPERTY(EditAnywhere)     float BaseRotationSpeed;      UPROPERTY(EditAnywhere)     float TurretRotationSpeed;      UPROPERTY(EditAnywhere)     float GunRotationSpeed;      \/\/ Shooting parameters     UPROPERTY(EditAnywhere)     float ShootDelay;      UPROPERTY(EditAnywhere)     float ShootingRange;      FTimerHandle ShootTimerHandle;      \/\/ Function to handle shooting     void Shoot(); }; <\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u0438\u0442\u043e\u0433\u0435, \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438. \u0413\u043b\u0430\u0432\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u044d\u0442\u043e\u0433\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u0431\u044a\u0435\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043a\u043e\u0434 <code>.cpp<\/code> \u0438 <code>.h<\/code> \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0435 \u0443\u043c\u0435\u0441\u0442\u0438\u043b\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0435. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0432\u0438\u0434\u043d\u044b \u0447\u0430\u0442-\u0431\u043e\u0442\u0443, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443 \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>\u0427\u0430\u0442-\u0431\u043e\u0442 GPT \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u043e\u043d \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u043b\u0435\u0433\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<p>\u041e\u043d\u0438 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0441 \u043d\u0443\u043b\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e \u0435\u0441\u0442\u044c \u0438 \u043f\u043b\u044e\u0441\u044b \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f GPT \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043e\u0431 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u0445 GPT \u0438 \u0435\u0433\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0434\u043b\u044f\u00a0 Unreal Engine. \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e GPT \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u043d\u043e\u0439 \u043e\u043f\u044b\u0442\u0430 \u0438 \u043a\u043e\u043c\u043f\u0435\u0442\u0435\u043d\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0438 \u0442\u043e\u0447\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445.<\/p>\n<p>\u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u0441 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435\u043c \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, GPT \u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u041e\u043d \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0430\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u0438\u043b\u0438 \u0430\u0441\u0441\u0435\u0442\u044b \u0434\u043b\u044f \u0438\u0433\u0440. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u0443\u0442\u044c \u043a \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043d\u0430\u0432\u044b\u043a\u0438 \u0438 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u0432\u0438\u0436\u043a\u0430 Unreal Engine \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u0433\u0440 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u0430\u043c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0433\u043b\u0443\u0431\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u0438 \u043d\u0430\u0432\u044b\u043a\u0438 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u0433\u0440 \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0438\u0440\u043e\u0432. OTUS \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u0430\u043c <a href=\"https:\/\/otus.pw\/1z3r\/\">\u043f\u043e\u0441\u0435\u0442\u0438\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0432\u0435\u0431\u0438\u043d\u0430\u0440<\/a>, \u0433\u0434\u0435 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u043c\u0441\u044f \u0432 \u043c\u0438\u0440 Unreal Engine \u0438 \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442 \u0432\u0437\u0440\u044b\u0432\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Niagara System. \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432 Niagara \u0438 \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u0432\u0437\u0440\u044b\u0432\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u044d\u043c\u0438\u0442\u0442\u0435\u0440\u043e\u0432.  <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/761288\/\"> https:\/\/habr.com\/ru\/articles\/761288\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<div class=\"persona\" persona=\"true\">\n<h5 class=\"persona__heading\" persona=\"true\">\u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438: \u0420\u043e\u0441\u0442\u0438\u0441\u043b\u0430\u0432 \u041c\u0443\u0441\u0438\u0435\u043d\u043a\u043e<\/h5>\n<p>Senior Unreal Engine Developer \u0432 District Zero  <\/p>\n<\/div>\n<p>\u0412\u0441\u0435 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0438\u0433\u0440\u043e\u0432\u044b\u043c \u0434\u0432\u0438\u0436\u043a\u043e\u043c Unreal Engine 5. \u0418 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438\u043b\u0438 \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043e GPT chat. \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0442 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 C++ \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 Unreal Engine<\/p>\n<p>\u0420\u0435\u0448\u0438\u043b \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0435\u0440\u044c \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436, \u0441\u0434\u0435\u043b\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442 \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.<\/p>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>MyActorDoor.cpp<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">#include \"MyActorDoor.h\" #include \"Components\/StaticMeshComponent.h\" #include \"GameFramework\/Actor.h\"  AMyActorDoor::AMyActorDoor() {     \/\/ Set this actor to call Tick() every frame.     PrimaryActorTick.bCanEverTick = true;      \/\/ Create the static mesh component for the door     DoorMesh = CreateDefaultSubobject&lt;UStaticMeshComponent>(TEXT(\"DoorMesh\"));     RootComponent = DoorMesh;      \/\/ Set the default door rotation     TargetRotation = FRotator(0.f, 90.f, 0.f); }  void AMyActorDoor::BeginPlay() {     Super::BeginPlay(); }  void AMyActorDoor::Tick(float DeltaTime) {     Super::Tick(DeltaTime);      \/\/ If the door should be opened, interpolate the rotation     if (bShouldOpen)     {         FRotator CurrentRotation = DoorMesh->GetComponentRotation();         FRotator NewRotation = FMath::RInterpTo(CurrentRotation, TargetRotation, DeltaTime, 2.f);         DoorMesh->SetWorldRotation(NewRotation);          \/\/ Check if the door is fully opened         if (CurrentRotation.Equals(TargetRotation, 1.f))         {             bShouldOpen = false;         }     } }  void AMyActorDoor::OpenDoor() {     bShouldOpen = true; } <\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>MyActorDoor.h<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">#pragma once  #include \"CoreMinimal.h\" #include \"GameFramework\/Actor.h\" #include \"MyActorDoor.generated.h\"  UCLASS() class GPT_TEST_API AMyActorDoor : public AActor {     GENERATED_BODY()  public:     \/\/ Sets default values for this actor's properties     AMyActorDoor();      \/\/ Called every frame     virtual void Tick(float DeltaTime) override;      \/\/ Function to open the door     UFUNCTION(BlueprintCallable, Category = \"Door\")     void OpenDoor();  protected:     \/\/ Called when the game starts or when spawned     virtual void BeginPlay() override;  private:     \/\/ Static mesh component for the door     UPROPERTY(VisibleAnywhere)     UStaticMeshComponent* DoorMesh;      \/\/ The target rotation for the door when it's fully opened     FRotator TargetRotation;      \/\/ Flag to determine if the door should be opened     bool bShouldOpen; }; <\/code><\/pre>\n<p>\u0423\u0432\u0438\u0434\u0435\u0432 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u043f\u0440\u043e\u043b\u043e\u0436\u0438\u043b \u0447\u0430\u0442, \u044f \u0431\u044b\u043b \u0432\u043e\u043e\u0434\u0443\u0448\u0435\u0432\u043b\u0435\u043d. \u041e\u043d \u043f\u043e\u043d\u0438\u043c\u0430\u043b \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0438 \u0441\u0432\u044f\u0437\u0438 \u0432 \u0434\u0432\u0438\u0436\u043a\u0435 \u0430 \u0442\u0430\u043a \u0436\u0435 \u0431\u044b\u043b \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c.<br \/>\u0414\u0430\u043b\u0435\u0435, \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u044f \u043a\u043b\u0430\u0441\u0441 \u0432 \u0431\u043b\u0443\u043f\u0440\u0438\u043d\u0442 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043c\u0435\u0448 \u0434\u0432\u0435\u0440\u0438 \u044f \u043f\u043e\u0448\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c.<br \/>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043e\u043d \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0434\u0432\u0435\u0440\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u042f \u043f\u043e\u043d\u044f\u043b \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c, \u0438 \u0434\u0430\u043b\u0435\u0435 \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0442\u043e\u0447\u0435\u0447\u043d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u0430\u043a \u043b\u0435\u0433\u043a\u043e.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u0432 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u0441\u0435 \u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c, \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0446\u0435\u043b\u044c\u044e \u0431\u044b\u043b\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0447\u0430\u0442\u0430 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u043a\u043e\u0434.<\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"\"><\/figure>\n<p>\u041e\u043d \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b \u043e\u0431\u0440\u044b\u0432\u043e\u0447\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"\"><\/figure>\n<figure class=\"full-width\"><\/figure>\n<figure class=\"\"><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0440\u0435\u0434\u044b \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u043a\u043e\u0434 \u0441\u043d\u043e\u0432\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0438 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c.<br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043a\u0430\u043a \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u043b \u0434\u0432\u0435\u0440\u044c \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436 \u043a \u043d\u0435\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b. <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0430, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u0442\u0443\u0440\u0435\u043b\u0438 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0438\u0433\u0440\u043e\u043a\u043e\u043c.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u043b \u0432\u044b\u0441\u043b\u0430\u043d \u0442\u043e\u043b\u044c\u043a\u043e <code>.cpp<\/code> \u043a\u043e\u0434 \u0438 \u0434\u0430\u0436\u0435 \u0432 \u043d\u0435\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043b\u043e\u0433\u0438\u043a\u0438 \u0434\u043b\u044f \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u043b\u043e\u0433\u0438\u043a\u0438 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u044b \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0430\u043d\u0435\u0435 \u043d\u0435\u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0441\u043d\u0430\u0440\u044f\u0434\u043e\u0432 \u0438\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u0430)<\/p>\n<pre><code class=\"cpp\">#include \"TurretActor.h\" #include \"GameFramework\/SpringArmComponent.h\" #include \"Camera\/CameraComponent.h\" #include \"Kismet\/GameplayStatics.h\" #include \"Components\/BoxComponent.h\" #include \"Components\/StaticMeshComponent.h\" #include \"TimerManager.h\"  \/\/ Sets default values ATurretActor::ATurretActor() {     \/\/ Set this actor to call Tick() every frame.     PrimaryActorTick.bCanEverTick = true;      \/\/ Create the base mesh component     BaseMesh = CreateDefaultSubobject&lt;UStaticMeshComponent>(TEXT(\"BaseMesh\"));     RootComponent = BaseMesh;      \/\/ Create the turret mesh component     TurretMesh = CreateDefaultSubobject&lt;UStaticMeshComponent>(TEXT(\"TurretMesh\"));     TurretMesh->SetupAttachment(BaseMesh);      \/\/ Create the gun mesh component     GunMesh = CreateDefaultSubobject&lt;UStaticMeshComponent>(TEXT(\"GunMesh\"));     GunMesh->SetupAttachment(TurretMesh);      \/\/ Create the collision box for player detection     PlayerDetectionBox = CreateDefaultSubobject&lt;UBoxComponent>(TEXT(\"PlayerDetectionBox\"));     PlayerDetectionBox->SetupAttachment(GunMesh);      \/\/ Set up initial rotation values     BaseRotationSpeed = 20.0f;     TurretRotationSpeed = 10.0f;     GunRotationSpeed = 5.0f;      \/\/ Set up the delay between shots and shooting range     ShootDelay = 2.0f;     ShootingRange = 1000.0f; }  \/\/ Called when the game starts or when spawned void ATurretActor::BeginPlay() {     Super::BeginPlay();      \/\/ Set up the player character reference     ACharacter* PlayerCharacter = UGameplayStatics::GetPlayerCharacter(GetWorld(), 0);     if (PlayerCharacter)     {         PlayerCharacterRef = PlayerCharacter;     }      \/\/ Start the shooting timer     GetWorldTimerManager().SetTimer(ShootTimerHandle, this, &amp;ATurretActor::Shoot, ShootDelay, true); }  \/\/ Called every frame void ATurretActor::Tick(float DeltaTime) {     Super::Tick(DeltaTime);      \/\/ Rotate the turret base towards the player     if (PlayerCharacterRef)     {         FVector PlayerLocation = PlayerCharacterRef->GetActorLocation();         FVector TurretLocation = TurretMesh->GetComponentLocation();         FRotator LookAtRotation = (PlayerLocation - TurretLocation).Rotation();         FRotator BaseRotation = FRotator(0.f, LookAtRotation.Yaw, 0.f); \/\/ Only yaw rotation          FRotator NewBaseRotation = FMath::RInterpTo(BaseMesh->GetComponentRotation(), BaseRotation, DeltaTime, BaseRotationSpeed);         BaseMesh->SetWorldRotation(NewBaseRotation);          \/\/ Rotate the turret towards the player         FRotator NewTurretRotation = FMath::RInterpTo(TurretMesh->GetComponentRotation(), LookAtRotation, DeltaTime, TurretRotationSpeed);         TurretMesh->SetWorldRotation(NewTurretRotation);          \/\/ Rotate the gun towards the player         FRotator GunLookAtRotation = (PlayerLocation - GunMesh->GetComponentLocation()).Rotation();         FRotator NewGunRotation = FMath::RInterpTo(GunMesh->GetComponentRotation(), GunLookAtRotation, DeltaTime, GunRotationSpeed);         GunMesh->SetWorldRotation(NewGunRotation);          \/\/ Check if the turret is facing the player and within shooting range         FVector ToPlayer = PlayerLocation - GunMesh->GetComponentLocation();         float DotProduct = FVector::DotProduct(ToPlayer.GetSafeNormal(), GunMesh->GetForwardVector());         if (DotProduct > 0.99f &amp;&amp; ToPlayer.Size() &lt;= ShootingRange)         {             \/\/ Fire when facing the player             Shoot();         }     } }  void ATurretActor::Shoot() {     \/\/ Implement your shooting logic here     \/\/ You can spawn projectiles or apply damage to the player, for example }  \/\/ Other functions and logic can be added as needed <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0445\u043e\u0442\u044f \u0431\u044b \u0442\u043e\u0433\u043e \u043a\u043e\u0433\u0434\u0430, \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0444\u0430\u0439\u043b\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432, \u0438 \u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u043b<\/p>\n<figure class=\"full-width\"><\/figure>\n<pre><code class=\"cpp\">#pragma once  #include \"CoreMinimal.h\" #include \"GameFramework\/Actor.h\" #include \"TurretActor.generated.h\"  UCLASS() class GPT_TEST_API ATurretActor : public AActor {     GENERATED_BODY()  public:     \/\/ Sets default values for this actor's properties     ATurretActor();  protected:     \/\/ Called when the game starts or when spawned     virtual void BeginPlay() override;  public:     \/\/ Called every frame     virtual void Tick(float DeltaTime) override;  private:     \/\/ Base mesh component     UPROPERTY(VisibleAnywhere)     UStaticMeshComponent* BaseMesh;      \/\/ Turret mesh component     UPROPERTY(VisibleAnywhere)     UStaticMeshComponent* TurretMesh;      \/\/ Gun mesh component     UPROPERTY(VisibleAnywhere)     UStaticMeshComponent* GunMesh;      \/\/ Collision box for player detection     UPROPERTY(VisibleAnywhere)     UBoxComponent* PlayerDetectionBox;      \/\/ Player character reference     ACharacter* PlayerCharacterRef;      \/\/ Rotation speeds     UPROPERTY(EditAnywhere)     float BaseRotationSpeed;      UPROPERTY(EditAnywhere)     float TurretRotationSpeed;      UPROPERTY(EditAnywhere)     float GunRotationSpeed;      \/\/ Shooting parameters     UPROPERTY(EditAnywhere)     float ShootDelay;      UPROPERTY(EditAnywhere)     float ShootingRange;      FTimerHandle ShootTimerHandle;      \/\/ Function to handle shooting     void Shoot(); }; <\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u0438\u0442\u043e\u0433\u0435, \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438. \u0413\u043b\u0430\u0432\u043d\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u044d\u0442\u043e\u0433\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u043e\u0431\u044a\u0435\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043a\u043e\u0434 <code>.cpp<\/code> \u0438 <code>.h<\/code> \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0435 \u0443\u043c\u0435\u0441\u0442\u0438\u043b\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0435. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0432\u0438\u0434\u043d\u044b \u0447\u0430\u0442-\u0431\u043e\u0442\u0443, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443 \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>\u0427\u0430\u0442-\u0431\u043e\u0442 GPT \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u043e\u043d \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u0430\u0436\u0435 \u0434\u043b\u044f \u043b\u0435\u0433\u043a\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<p>\u041e\u043d\u0438 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0441 \u043d\u0443\u043b\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e \u0435\u0441\u0442\u044c \u0438 \u043f\u043b\u044e\u0441\u044b \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f GPT \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435;<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043e\u0431 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u0445 GPT \u0438 \u0435\u0433\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0434\u043b\u044f\u00a0 Unreal Engine. \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e GPT \u043d\u0435<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-354985","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354985","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=354985"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/354985\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=354985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=354985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=354985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}