Announcement

Collapse
No announcement yet.

Razer Hydra Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by getnamo View Post
    Let me know if 4.10 has the same issue.
    Just tried 4.10 with the new plugin and I have the same issue if I follow the steps from my previous post. I'm hopeful I can easily work around it by either creating a type of that pawn at runtime, or grabbing a reference to a pre-placed one in the level and then possessing it with the player controller, but I don't have the time today to test. It would still be nice to just use the "DefaultPawnClass" assignment. Less work/code

    Leave a comment:


  • replied
    Look's like bug fixing is back on the menu boys!

    Originally posted by LaP0573 View Post
    I've opened an issue on your GitHub, but not sure it was a good idea after reading that you advised polling problems into this thread, so I'll reiterate my question here. I've packaged a game with your plugin, copy pasted the plugin folder into the packaged game but I get this crash when starting the .exe :

    Code:
    ...
    Any idea ?
    The packaging bug seems like an order problem, the DataDelegate() call at 855 gets called before the reference is set. It will need some moving around and checking load orders in packaged games.


    Originally posted by astonish View Post
    getnamo,

    I have been able to replicate the problem consistently from a fresh project. Here are the steps using 4.9 and the experimental branch from the other thread. I don't have UE 4.10 downloaded yet so I haven't tried it with your new plugin. It seems to be 100% an order of operations problem as the log in this post will show. C++ game mode classes seem to be loaded before the hydra plugin causing the issue when they try loading the BP pawn that refers to the yet-to-be-loaded HydraPlugin.

    Code:
    ...
    Note that this is happening even though the default gameMode is still the blueprint version and not the C++ version. Add the HydraPluging back to the BP pawn and everything will run fine until you close the editor and reopen.

    Trying to set default pawn class at StartMatch() in the C++ GameMode crashes everything. I suppose I could try spawning a instance of the BP pawn and then attaching the player controller at StartMatch, but this error may still persist loading the editor... Here is the log from the editor launching with errors. You can clearly see the missing script errors output before the Hydra plugin begins init.

    Pastebin

    This may expected behaviour of the engine, I don't really know much about startup order, but for my project I'd really like to have a C++ game mode refer to a BP pawn that uses your (great) plugin.
    Great investigation, this will help narrow potential issue scope. Let me know if 4.10 has the same issue.


    Will have a look at these during the weekend, I want this new structure to be as solid as the last one.

    Leave a comment:


  • replied
    I've opened an issue on your GitHub, but not sure it was a good idea after reading that you advised polling problems into this thread, so I'll reiterate my question here. I've packaged a game with your plugin, copy pasted the plugin folder into the packaged game but I get this crash when starting the .exe :

    Code:
    MachineId:595E01B1444ED99F3D293181649D4B6D
    EpicAccountId:
    
    Access violation - code c0000005 (first/second chance not available)
    
    ""
    
    TestMotionSickness_Win64_Shipping!FHydraPlugin::DataDelegate() [f:\data\projects\ue4\testmotionsickness - copie\plugins\hydraplugin\source\hydraplugin\private\fhydraplugin.cpp:855]
    TestMotionSickness_Win64_Shipping!UHydraPluginComponent::InitializeComponent() [f:\data\projects\ue4\testmotionsickness - copie\plugins\hydraplugin\source\hydraplugin\private\hydracomponent.cpp:21]
    TestMotionSickness_Win64_Shipping!AActor::InitializeComponents()
    TestMotionSickness_Win64_Shipping!AActor::PostActorConstruction()
    TestMotionSickness_Win64_Shipping!AActor::FinishSpawning()
    TestMotionSickness_Win64_Shipping!AActor::PostSpawnInitialize()
    TestMotionSickness_Win64_Shipping!UWorld::SpawnActor()
    TestMotionSickness_Win64_Shipping!UWorld::SpawnActor()
    TestMotionSickness_Win64_Shipping!AGameMode::SpawnDefaultPawnFor_Implementation()
    TestMotionSickness_Win64_Shipping!AGameMode::execSpawnDefaultPawnFor()
    TestMotionSickness_Win64_Shipping!UFunction::Invoke()
    TestMotionSickness_Win64_Shipping!UObject::ProcessEvent()
    TestMotionSickness_Win64_Shipping!AActor::ProcessEvent()
    TestMotionSickness_Win64_Shipping!AGameMode::SpawnDefaultPawnFor()
    TestMotionSickness_Win64_Shipping!AGameMode::RestartPlayer()
    TestMotionSickness_Win64_Shipping!AGameMode::HandleMatchHasStarted()
    TestMotionSickness_Win64_Shipping!AGameMode::SetMatchState()
    TestMotionSickness_Win64_Shipping!UWorld::BeginPlay()
    TestMotionSickness_Win64_Shipping!UEngine::LoadMap()
    TestMotionSickness_Win64_Shipping!UEngine::Browse()
    TestMotionSickness_Win64_Shipping!UGameInstance::StartGameInstance()
    TestMotionSickness_Win64_Shipping!UGameEngine::Init()
    TestMotionSickness_Win64_Shipping!FEngineLoop::Init()
    TestMotionSickness_Win64_Shipping!GuardedMain()
    TestMotionSickness_Win64_Shipping!GuardedMainWrapper()
    TestMotionSickness_Win64_Shipping!WinMain()
    TestMotionSickness_Win64_Shipping!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
    kernel32
    ntdll
    Any idea ?

    Leave a comment:


  • replied
    getnamo,

    I have been able to replicate the problem consistently from a fresh project. Here are the steps using 4.9 and the experimental branch from the other thread. I don't have UE 4.10 downloaded yet so I haven't tried it with your new plugin. It seems to be 100% an order of operations problem as the log in this post will show. C++ game mode classes seem to be loaded before the hydra plugin causing the issue when they try loading the BP pawn that refers to the yet-to-be-loaded HydraPlugin.

    Code:
    1. Make a new blank C++ project
    2. Close the editor, add Hydra plugin
    3. Reopen editor, Edit->Plugins confirm hydra plugin is loaded
    4. Make a blueprint game mode "MyBlueprintgame" (in root "Content" folder)
    5. Make a blueprint pawn "MyHydraPawn" (in root "Content" folder)
    6. Open MyHydraPawn. Add HydraPlugin component.
        a. To BeginPlay add a is hydra available node and make it print something the screen
    7. Save all
    8. Open MyBlueprintGame and make the default pawn "MyHydraPawn" (might have to open the bp twice to get the right options to appear)
    9. Edit->Project Settings... -> Maps & Modes make MyBlueprintGame the gameMode
    10. P.I.E. and see that your debug print statement shows.
    11. Save All then exit the editor
    12. Reopen the editor. No error messages, P.I.E. and ensure print statement still shows
    13. Make a new C++ class, GameMode, MyCGameMode
    14. In Visual studio add a default constructor AMyCGameMode() make a definition with a blank body in the .cpp file.
    15. Compile.
    16. Go back to the editor. Save all. exit.
    17. Reload editor. No errors. Run, see debug message.
    18. In visual studio add the following code to the default constructor:
        static ConstructorHelpers::FObjectFinder<UBlueprint> razrbp(TEXT("Blueprint'/Game/MyRazorPawn.MyRazorPawn'"));
        if (razrbp.Object) {
                   DefaultPawnClass = (UClass*)razrbp.Object->GeneratedClass;
        }
    19. Compile. P.I.E. everything is still fine.
    20. Save all, close editor.
    21. Open editor. Error messages appear saying "/Game/MyRazorPawn: Can't find file for asset. /Script/HydraPlugin"
    22. P.I.E. also presents errors with BP compile
    23. Opening MyRazorPawn class show the class is now missing a HydraPlugin component.
    Note that this is happening even though the default gameMode is still the blueprint version and not the C++ version. Add the HydraPluging back to the BP pawn and everything will run fine until you close the editor and reopen.

    Trying to set default pawn class at StartMatch() in the C++ GameMode crashes everything. I suppose I could try spawning a instance of the BP pawn and then attaching the player controller at StartMatch, but this error may still persist loading the editor... Here is the log from the editor launching with errors. You can clearly see the missing script errors output before the Hydra plugin begins init.

    Pastebin

    This may expected behaviour of the engine, I don't really know much about startup order, but for my project I'd really like to have a C++ game mode refer to a BP pawn that uses your (great) plugin.

    Leave a comment:


  • replied
    Originally posted by san View Post
    getnamo, thanks for your work on this plugin!
    When I integrate the plug-in in an existing project we're getting errors every time we open the project. Actors that make use of the HydraComponent (so not the generic MotionController events) are broken. For some unknown reason the component is not found and thus all functionality related to it is removed from the Actors Blueprint.
    I'm now seeing this same problem on 4.9. Everything was working fine in my BP only prototype, but as soon as I changed to a C++ project (and then made a BP pawn set as default via C++ GameMode) this appears every open. My project is early enough along that I will try your 4.10 branch

    Leave a comment:


  • replied
    Hello,
    I've used the plugin for a gamejam, as well as VR stuff, and I'd like to package my project now to create a .exe. I get these errors while packaging, and from what I understand they seem to be linked to the Hydra plugin :

    Code:
    MainFrameActions: Packaging (Windows (64-bit)): Project.Build: ********** BUILD COMMAND STARTED **********
    MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: XGE was requested, but is unavailable, so we won't use it.
    MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* UE4Build:
    MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* ForceMonolithic: False
    MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* ForceNonUnity:False 
    MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* ForceDebugInfo: False
    MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* UseXGE: False
    MainFrameActions: Packaging (Windows (64-bit)): UE4Build.Build: ************************* UseParallelExecutor: False
    MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files\Epic Games\4.10\Engine\Binaries\DotNET\UnrealBuildTool.exe TestMotionSickness Win64 Development -clean "F:\Data\Projects\UE4\TestMotionSickness - Copie\TestMotionSickness.uproject"  -remoteini="F:\Data\Projects\UE4\TestMotionSickness - Copie" -nobuilduht -rocket -NoHotReloadFromIDE
    MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 2,7106767s to run UnrealBuildTool.exe, ExitCode=0
    MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files\Epic Games\4.10\Engine\Binaries\DotNET\UnrealBuildTool.exe TestMotionSickness Win64 Development  "F:\Data\Projects\UE4\TestMotionSickness - Copie\TestMotionSickness.uproject"  -remoteini="F:\Data\Projects\UE4\TestMotionSickness - Copie" -noxge -generatemanifest -rocket -NoHotReloadFromIDE -ignorejunk
    MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 1,2134635s to run UnrealBuildTool.exe, ExitCode=0
    MainFrameActions: Packaging (Windows (64-bit)): UE4Build.PrepareManifest: Copied UBT manifest to C:\Users\Faust\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+4.10\UBTManifest.0.xml
    MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files\Epic Games\4.10\Engine\Binaries\DotNET\UnrealBuildTool.exe TestMotionSickness Win64 Development  "F:\Data\Projects\UE4\TestMotionSickness - Copie\TestMotionSickness.uproject"  -remoteini="F:\Data\Projects\UE4\TestMotionSickness - Copie" -noxge -rocket -NoHotReloadFromIDE -ignorejunk
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Creating makefile for TestMotionSickness (no existing makefile)
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Performing full C++ include scan (no include cache file)
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Parsing headers for TestMotionSickness
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool:   Running UnrealHeaderTool "F:\Data\Projects\UE4\TestMotionSickness - Copie\TestMotionSickness.uproject" "F:\Data\Projects\UE4\TestMotionSickness - Copie\Intermediate\Build\Win64\TestMotionSickness\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Reflection code generated for TestMotionSickness in 5,6982198 seconds
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Performing 10 actions (4 in parallel)
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: PCH.HydraPluginPrivatePCH.h.cpp
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: PCH.UELinkerFixupsName.h.cpp
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: UELinkerFixups.cpp
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: -------- End Detailed Actions Stats -----------------------------------------------------------
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: F:\Data\Projects\UE4\TestMotionSickness - Copie\Plugins\HydraPlugin\Binaries\Win64\UE4-HydraPlugin.lib
    MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Total build time: 17,02 seconds
    MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 17,0528513s to run UnrealBuildTool.exe, ExitCode=5
    MainFrameActions: Packaging (Windows (64-bit)): BuildCommand.Execute: ERROR: BUILD FAILED
    MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception:
    MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: Exception in AutomationUtils.Automation: Command failed (Result:5): C:\Program Files\Epic Games\4.10\Engine\Binaries\DotNET\UnrealBuildTool.exe TestMotionSickness Win64 Development  "F:\Data\Projects\UE4\TestMotionSickness - Copie\TestMotionSickness.uproject"  -remoteini="F:\Data\Projects\UE4\TestMotionSickness - Copie" -noxge -rocket -NoHotReloadFromIDE -ignorejunk. See logfile for details: 'UnrealBuildTool-2015.11.24-19.23.39.txt' 
    MainFrameActions: Packaging (Windows (64-bit)): Stacktrace:    à AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars)
    MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
    MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.UE4Build.BuildWithUBT(String ProjectName, String TargetName, UnrealTargetPlatform TargetPlatform, String Config, String UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
    MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars)
    MainFrameActions: Packaging (Windows (64-bit)):    à Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL)
    MainFrameActions: Packaging (Windows (64-bit)):    à BuildCookRun.DoBuildCookRun(ProjectParams Params)
    MainFrameActions: Packaging (Windows (64-bit)):    à BuildCommand.Execute()
    MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
    MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.Automation.Process(String[] CommandLine)
    MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.Program.MainProc(Object Param)
    MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.InternalUtils.RunSingleInstance(Action`1 Main, Object Param)
    MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.Program.Main()
    MainFrameActions: Packaging (Windows (64-bit)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
    MainFrameActions: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=5
    MainFrameActions: Packaging (Windows (64-bit)): Domain_ProcessExit
    MainFrameActions: Packaging (Windows (64-bit)): copying UAT log files...
    MainFrameActions: Packaging (Windows (64-bit)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
    MainFrameActions: Packaging (Windows (64-bit)): BUILD FAILED

    Any idea ?

    Leave a comment:


  • replied
    YES Thanks a lot !

    Leave a comment:


  • replied
    Update to 0.8.3
    -Updated to 4.10
    -Experimental branch merged into master

    The experimental branch changes are now in master so if you haven't tried them, the 0.8+ plugin version works quite differently and I recommend you read the github readme and this thread to bring you up to speed.


    @Everyone Thanks for all the kind words of appreciation, now go make awesome stuff with 4.10!



    Originally posted by san View Post
    getnamo, thanks for your work on this plugin!

    However I've encounter quite a nasty issue with the plug-in (4.9 experimental branch on UE4 4.9.2). It might be a generic UE4 plug-in issue and not related to your work but perhaps (hopefully) you are familiar with the issue.

    When I integrate the plug-in in an existing project we're getting errors every time we open the project. Actors that make use of the HydraComponent (so not the generic MotionController events) are broken. For some unknown reason the component is not found and thus all functionality related to it is removed from the Actors Blueprint.

    When inspecting the logs I noticed this:
    Code:
    ...
    It appears that the plug-in is loaded after the assets are loaded. Might this be the issue? If it is, do you know of a fix / work-around?
    When we tried your plug-in using a blank C++ project all seems to work fine... however starting over is not really an option. Especially when there is no guarantee that it will not reappear.
    The project started off as a Blueprint project and we've added C++ code later on. This should not matter but you never know.

    Sorry for this "cry for help" kind of post but WHELP!
    Haven't seen this before, you may need to break down the loading or shrink the problem size by trying to recreate the problem from a blank state. Once you have a reliable repro I can take a look into it.

    Leave a comment:


  • replied
    hi getnamo do you plan to release a compiled version for 4.10 soon ?
    Your stuff is amazing so far but we have trouble with 4.9 and like to use the new features of 4.10!

    Leave a comment:


  • replied
    getnamo, thanks for your work on this plugin!

    However I've encounter quite a nasty issue with the plug-in (4.9 experimental branch on UE4 4.9.2). It might be a generic UE4 plug-in issue and not related to your work but perhaps (hopefully) you are familiar with the issue.

    When I integrate the plug-in in an existing project we're getting errors every time we open the project. Actors that make use of the HydraComponent (so not the generic MotionController events) are broken. For some unknown reason the component is not found and thus all functionality related to it is removed from the Actors Blueprint.

    When inspecting the logs I noticed this:
    Code:
    LogLinker:Warning: Can't find file '/Script/HydraPlugin'
    LogLinker:Warning: Can't find file for asset '/Script/HydraPlugin' while loading D:/Unreal/AwesomeGameProject/Content/Assets/Graphics/Models/Characters/Godzilla01_Skeleton_AnimBlueprint.uasset.
    LoadErrors:Error: Error /Game/Assets/Graphics/Models/Characters/Godzilla01_Skeleton_AnimBlueprint : Can't find file for asset. /Script/HydraPlugin
    LogLinker:Warning: Can't find file '/Script/HydraPlugin'
    LogLinker:Warning: Can't find file for asset '/Script/HydraPlugin' while loading D:/Unreal/AwesomeGameProject/Content/Assets/Graphics/Models/Characters/Godzilla01_Skeleton_AnimBlueprint.uasset.
    LoadErrors:Error: Error /Game/Assets/Graphics/Models/Characters/Godzilla01_Skeleton_AnimBlueprint : Can't find file for asset. /Script/HydraPlugin
    LogLinker:Warning: Can't find file '/Script/HydraPlugin'
    ...
    HydraPluginLog: Attempting to startup Hydra Module, v0.8.2
    HydraPluginLog: Fetching dll from E:/Documents/Unreal Projects/HydraTest/Plugins/HydraPlugin/Source/ThirdParty/Sixense/Binaries/Win64/sixense_x64.dll
    HydraPluginLog: Hydra Available.
    It appears that the plug-in is loaded after the assets are loaded. Might this be the issue? If it is, do you know of a fix / work-around?
    When we tried your plug-in using a blank C++ project all seems to work fine... however starting over is not really an option. Especially when there is no guarantee that it will not reappear.
    The project started off as a Blueprint project and we've added C++ code later on. This should not matter but you never know.

    Sorry for this "cry for help" kind of post but WHELP!

    Leave a comment:


  • replied
    Just tested your last update, it works like a charm on 4.9.2, especially the calibration. Saves a lot of time, a big thanks to you getnamo.

    Leave a comment:


  • replied
    Cannot thank you enough, getnamo! i was probably waay too excited when i saw you had updated, things seem to run beautifully now, even in conjunction with the rift, seriously generous and awesome.
    if there is some other way i and the others who benefit from your work let me know (patreon, donations etc..) you're enabling us to develop for the next wave of VR interaction at a time when the upcoming hardware is simply unavailable to us.
    You rock.
    so much.

    Leave a comment:


  • replied
    Thanks for your work your plugin has been part of my past two weeks of creation!
    Last edited by Fantasifall; 10-08-2015, 03:50 PM.

    Leave a comment:


  • replied
    Great work Getnamo! I tested it a lot today and had zero crashes ! Yoohoo.. Saves a lot of time. Could not get my hand around the new calibration thing but whatever.. Already got this one working myself. Awesome!
    Dit not test the packaging yet.

    Leave a comment:


  • replied
    Experimental Branch Update to E0.8.2
    -Added ButtonPressed and ButtonReleased events to HydraPluginComponent
    -Cleaned up code a bit
    -Added ability for the plugin to auto-hide your attached MeshComponents,
    see readme for details.


    This update adds button pressed/released events back to the plugin so you can do everything within the blueprint events if you wish.

    The new auto-hiding feature is enabled by making the plugin aware of the mesh components you attached to each hand by calling SetMeshComponentLinks and selecting HideMeshComponentWhenDocked = true on the HydraPluginComponent



    Then whenever you dock either or both controllers, the associated mesh just hides. Easy.

    I also realized the reason the plugin feels like it tracks better, Epic's input system re-samples input at the end of the frame to have the very latest data. Regular component ticks don't do this which is why the plugin has reduced latency.
    Last edited by getnamo; 10-08-2015, 12:23 PM.

    Leave a comment:

Working...
X