Skip to content

Instantly share code, notes, and snippets.

@8bitsage
8bitsage / py script Get BP Character info
Created August 3, 2025 13:18
скрипт на получение иерархии персонажа
import unreal, os, json, datetime, shutil, traceback
# --- Настройка: если ничего не выделено, можно вручную указать пути к blueprint'ам в формате "/Game/..." ---
manual_blueprint_paths = [] # пример: ["/Game/PlayerCharacter/BP_SYNXRCharacter"]
# --- Утилиты ---
def get_generated_class_from_blueprint(bp):
path = bp.get_path_name()
if "." in path:
base, name = path.rsplit(".", 1)
@8bitsage
8bitsage / AVRPlayerCharacter.cpp
Created May 27, 2025 12:36
Arm Swinging sprint (h and cpp files example)
void AVRPlayerCharacter::BeginPlay()
{
Super::BeginPlay();
// Инициализируем начальные позиции контроллеров
LastLeftControllerPos = LeftMotionController ?
LeftMotionController->GetRelativeLocation() : FVector::ZeroVector;
LastRightControllerPos = RightMotionController ?
RightMotionController->GetRelativeLocation() : FVector::ZeroVector;
@8bitsage
8bitsage / gist:a33dfdaf143567c4f14d1592d45c1d59
Created May 10, 2025 21:38
export bones SkeletalMesh in Unreal Engine 5.5 (Python)
import unreal
import os
# Путь к Skeletal Mesh в Content Browser
skeletal_mesh_path = "/Game/EXTContent/Characters/Mannequins/Meshes/SKM_Manny"
output_path = "D:/bone_transforms_SKM_Manny.txt"
# Загружаем Skeletal Mesh
skeletal_mesh = unreal.EditorAssetLibrary.load_asset(skeletal_mesh_path)
// Synorion. All Rights Reserved.
#include "PlayerCharacter/Components/VRCharacterMovementComponent.h"
#include "PlayerCharacter/VRCharacterDataAsset.h"
#include "Camera/CameraComponent.h"
#include "Engine/Engine.h"
#include "GameFramework/Pawn.h" // для PawnOwner
void UVRCharacterMovementComponent::HandleMovementInput(
const FVector2D& InputVector,
@8bitsage
8bitsage / VRCameraCalibrationComponent.cpp
Last active March 11, 2025 08:16
Unreal Engine Component for VRCameraCalibration
#include "Player/Components/VRCameraCalibrationComponent.h"
#include "GameFramework/Character.h"
#include "TimerManager.h"
#include "Camera/CameraComponent.h"
#include "Components/SceneComponent.h"
#include "Engine/World.h"
// Опционально объявляем лог-категорию, чтобы отделять логи компонента
DEFINE_LOG_CATEGORY_STATIC(LogVRCameraCalibrationComponent, All, All);