Plugin

[=Tayber415;208019]
Hey Guys

I was wondering if there’s anyway to reset orientation position? So that I can hit start and it zeros everything and if I move it from that position/orientation it’ll update values using that position as 0xyz/0pry.
Any ideas on would be great, thanks!
[/]

Simply store the values of the hydra position/orientation at the point you call your reset function(once) and subtract the position/orientation out in all of your output positions (every tick/input event). will achieve the effect you’re looking for.

Thanks for the reply. I really appreciate it.

I have another question. I’m using a bone transform for the right hand rotation and I want the left arm to move depending on the location/rotation of the right. Basically the character is going to be holding a rifle and I want just the right hydra to control the rifle. So I need the left arm to be basically be attached to the rifle and have it move with the rifle. So how would you suggest I go about doing that… Do I have to rig my model to do that or is there a way to do it in engine? I’m fairly new to so any advice would be great.

Thanks guys

[=Tayber415;213648]
Thanks for the reply. I really appreciate it.

I have another question. I’m using a bone transform for the right hand rotation and I want the left arm to move depending on the location/rotation of the right. Basically the character is going to be holding a rifle and I want just the right hydra to control the rifle. So I need the left arm to be basically be attached to the rifle and have it move with the rifle. So how would you suggest I go about doing that… Do I have to rig my model to do that or is there a way to do it in engine? I’m fairly new to so any advice would be great.

Thanks guys
[/]

If you want the left hand to follow the rifle, add a socket where your left hand should be to your rifle. Then as the right hand holds the rifle and the wrist rotates the rifle, the left hand will follow that socket location instead of where the hydra is reporting the left hand location to be.

You simply specify the the character is holding the rifle (attach rifle object to right hand socket) and fetch the rifle’s left hand socket position and use as the position for the left hand IK.

[=;216421]

[/]

Hi , thanks for developing plugin, it’s great and it’s really helpful.
Anyway, i’m having a very annoying bug, every time i close a project with your plugin (or the project crashes) and i reopen it, the Hydra interface in blueprints gets lost,
so i get error:
Error /Game/FirstPerson/Blueprints/FirstPersonCharacter : Can’t find file for asset. /Script/HydraPlugin

With UE 4. BluePrint gets unopenable, and its progressions are lost forever, the only thing you can do is restore a backup, but one before you added the Hydra Interface, so it isn’t that useful, and anyway i can’t close the engine, or i’ll loose all the work.
Of course i save everything and compile blueprints and the project, and i haven’t touched the code, i’m trying with FPS default project.
I might be doing something wrong and very stupid, but i can’t find a solution.

Fortunately, UE 4.7 (Preview 8) fixes the opening problem, and you can reimport the Hydra Interface, and fix the blueprint (you need to re-add all the events anyway).

I have tried to add other default interfaces that come with UE4 and apparently, they don’t get lost after the program closes, so i’m assuming it’s a bug of Hydra Plugin, but i can’t be sure.

The Hydra Component also gets lost, both in UE 4.6 and 4.7.

i’m developing a Uni Project with UE4, Oculus Rift and Hydra, and it’s due in 2 months, that’s why i’m desperately trying to find a solution.

#Update:
i think there is a bug with your plugin in UE 4.7 that is not present in 4.6, it might be the engine.
When you press play, in the viewport, and you have changed anything in a blueprint, the first time the hydra will not send the events, you have to stop and press play again.

#Update 2…:
i also get error, which i totally believe is my fault, but you never know, it might help.
(i have included HydraDelegate.h in MyCharacter and MyProject.h in HydraDelegate.h

[=;226611]
Hi , thanks for developing plugin, it’s great and it’s really helpful.
Anyway, i’m having a very annoying bug, every time i close a project with your plugin (or the project crashes) and i reopen it, the Hydra interface in blueprints gets lost,
so i get error:
Error /Game/FirstPerson/Blueprints/FirstPersonCharacter : Can’t find file for asset. /Script/HydraPlugin

With UE 4. BluePrint gets unopenable, and its progressions are lost forever, the only thing you can do is restore a backup, but one before you added the Hydra Interface, so it isn’t that useful, and anyway i can’t close the engine, or i’ll loose all the work.
Of course i save everything and compile blueprints and the project, and i haven’t touched the code, i’m trying with FPS default project.
I might be doing something wrong and very stupid, but i can’t find a solution.

Fortunately, UE 4.7 (Preview 8) fixes the opening problem, and you can reimport the Hydra Interface, and fix the blueprint (you need to re-add all the events anyway).

I have tried to add other default interfaces that come with UE4 and apparently, they don’t get lost after the program closes, so i’m assuming it’s a bug of Hydra Plugin, but i can’t be sure.

The Hydra Component also gets lost, both in UE 4.6 and 4.7.

i’m developing a Uni Project with UE4, Oculus Rift and Hydra, and it’s due in 2 months, that’s why i’m desperately trying to find a solution.

[/]

I’m guessing you’re using the C++ fps template? If that is the case, the problem may be related to [Plugin] Leap Motion - Event Driven - C++ - Epic Developer Community Forums to which the solution was to sub-class your C++ base character as a blueprint and then sub-class that blueprint to use your hydra component/interface. Still unsure why error occurs, but it only occurs when the base class is derived from C++ not blueprint.

[=;226611]

#Update:
i think there is a bug with your plugin in UE 4.7 that is not present in 4.6, it might be the engine.
When you press play, in the viewport, and you have changed anything in a blueprint, the first time the hydra will not send the events, you have to stop and press play again.

[/]

Haven’t had a to try 4.7 yet, will look into when it comes out of preview

[=;226611]

#Update 2…:
i also get error, which i totally believe is my fault, but you never know, it might help.
(i have included HydraDelegate.h in MyCharacter and MyProject.h in HydraDelegate.h

[/]

You have to add a component** and** an interface in order to receive the events. The error message you are getting is saying that whatever class you added a component to, doesn’t respond to hydra interface events, so you’re missing the interface. You also have access to conveniences classes such as hydra actor or hydra player controller which can abstract your hydra interaction away from a specific blueprint, may be a simpler way of using the plugin.

[=;226897]
I’m guessing you’re using the C++ fps template? If that is the case, the problem may be related to [Plugin] Leap Motion - Event Driven - C++ - Epic Developer Community Forums to which the solution was to sub-class your C++ base character as a blueprint and then sub-class that blueprint to use your hydra component/interface. Still unsure why error occurs, but it only occurs when the base class is derived from C++ not blueprint.

You have to add a component** and** an interface in order to receive the events. The error message you are getting is saying that whatever class you added a component to, doesn’t respond to hydra interface events, so you’re missing the interface. You also have access to conveniences classes such as hydra actor or hydra player controller which can abstract your hydra interaction away from a specific blueprint, may be a simpler way of using the plugin.
[/]

Ok, so, I have tried everything possible, both with 4.6.1 and 4.7 Preview 8 so i don’t think 4.7 has anything to do with problem.

I have added the component and the interface, i had done it in the first place, and tons of times, in different ways, it works, but after you restart, you get the same annoying error:
(i’m going to attach some picture because is driving me insane)


As you see, time, as you suggested to, i created a blueprint of the character c++ class, and then i have created a child of that blueprint.
it is clear from the screenshot that i have added the interface (and the hydra component) in both the father and child blueprint, but i have also tried to add them to just the father and just the child, i have also played around with question as i though it might have something to do it the error:
edcfae9956d2527b46c6c6d26eb957f7e548e780.jpeg
(if you click yes, apparently, there is no way to revert it)
so, finally, i can say i have tried every single possibility, every time the blueprints compile, the hydra works in Viewport Play, but it never works in Standalone Game. (Shipping just doesn’t build as now, but i’m not worried about that).

is how the game looks in viewport (and how it is supposed to look right now):


You have to hands/arms, that you can move with your left and right hydra, and everything works as supposed.
I’m spawning a FPCharacter_Child at a pawn when the game starts, not its father. i’ve been logging and debugging the hydra and plugin, and excluding these errors, it seems to work perfectly.
I don’t have anything else in my scene.

Instead, in the Standalone Game, i have 2 outcomes,
one where it says: “HydraBlueprintDelegate Warning: HydraInterface Delegate is NOT set, did your class implement HydraInterface? Events are disabled.” (twice), as you have previously seen in the screenshot of my last post.
The other outcome is without any error, it just plays without the arms but you can still move around, it not clear to me why, i’ll have a look at your code and cases where it gives error, but i don’t think i’ll be able to fix it, i’m pretty new to UE.
it’s not clear what causes one or the other to appear.
I guess that in Standalone Game, it kinds of compile the game differently, and since it runs in a different process, it might the same exact error that causes the “… Can’t find file for asset. …”, it’s like the HydraInterface and component remain in the editor instance/memory and do not get saved or compiled with the rest of the project. it seems to be more likely a problem that comes from unreal than from the plugin.

is my current BluePrint setup for FPCharacter_Child (The event graph in the Father is Empty):


As i said before, i also tried to add the interface and the hydra component directly in the child instead of inheriting them from the father, but that doesn’t change the outcode (after restarting the engine, they get lost).

I’ll update if there is any news. i’m trying to do my best but it’s just hard to understand UE in such a short time.

[=;228260]

[/]

Update: i created a Blank project in both 4.6 and 4.7, added the hydra and everything works fine, even in Standalone Game.
i’ll leave my previous post for the author of the plugin, hopefully it can help him debugging the problem if it doesn’t come from UE4 source code.

i don’t even know why i have started from an FirstPerson Project, i’ll keep building on the Black project.
Thanks.

[=;228302]
Update: i created a Blank project in both 4.6 and 4.7, added the hydra and everything works fine, even in Standalone Game.
i’ll leave my previous post for the author of the plugin, hopefully it can help him debugging the problem if it doesn’t come from UE4 source code.

i don’t even know why i have started from an FirstPerson Project, i’ll keep building on the Black project.
Thanks.
[/]

Good to know you got it to work. Maybe someday I’ll get that debugged.

Update to 0.7.7
-Update to 4.7
-Fixed a memory leak.

see the original post for downloads.

[=;226897]
I’m guessing you’re using the C++ fps template? If that is the case, the problem may be related to [Plugin] Leap Motion - Event Driven - C++ - Epic Developer Community Forums to which the solution was to sub-class your C++ base character as a blueprint and then sub-class that blueprint to use your hydra component/interface. Still unsure why error occurs, but it only occurs when the base class is derived from C++ not blueprint.

Haven’t had a to try 4.7 yet, will look into when it comes out of preview

You have to add a component** and** an interface in order to receive the events. The error message you are getting is saying that whatever class you added a component to, doesn’t respond to hydra interface events, so you’re missing the interface. You also have access to conveniences classes such as hydra actor or hydra player controller which can abstract your hydra interaction away from a specific blueprint, may be a simpler way of using the plugin.
[/]

Hi , thanks for your plugin. It really does great help!

I’d like to know if you got any update on the issue that Unreal editor crashes when using c++ character as default pawn class.
I’m working on a project that have a base character class, and several sub character classes derived from it. These sub characters are required for the game as I need to switch game mode during inter-level trip.

Let’s say I use base class for level 1, sub-class A for level 2, sub-class B for level 3…
If I 1) create a child blueprint derived from the base class
2) add Hydra features to it
3) use it as the default pawn
4) let sub-class A and sub-class B inherit child blueprint class (in c++)
the editor will be sure to crash once play.
If I 1) create a child blueprint derived from the base class
2) add Hydra features to it
3) use it as the default pawn
everything goes on well in level 1, but Hydra feature won’t be applied to level 2 / 3.
If I 1) create child blueprint for base class, sub-class A and sub-class B
2) write inter-level switch logic in C++ (to use new blueprint character classes instead of sub-class A and sub-class B)
the Unreal editor will also crash.

The crashes are all cause by same reason per log files: Can’t find file for asset. /Script/HydraPlugin

Do you have any other solution on issue? Kindly lemme know :slight_smile:

[=PhoenixThrough;236679]
Hi , thanks for your plugin. It really does great help!

I’d like to know if you got any update on the issue that Unreal editor crashes when using c++ character as default pawn class.
I’m working on a project that have a base character class, and several sub character classes derived from it. These sub characters are required for the game as I need to switch game mode during inter-level trip.

Let’s say I use base class for level 1, sub-class A for level 2, sub-class B for level 3…
If I 1) create a child blueprint derived from the base class
2) add Hydra features to it
3) use it as the default pawn
4) let sub-class A and sub-class B inherit child blueprint class (in c++)
the editor will be sure to crash once play.
If I 1) create a child blueprint derived from the base class
2) add Hydra features to it
3) use it as the default pawn
everything goes on well in level 1, but Hydra feature won’t be applied to level 2 / 3.
If I 1) create child blueprint for base class, sub-class A and sub-class B
2) write inter-level switch logic in C++ (to use new blueprint character classes instead of sub-class A and sub-class B)
the Unreal editor will also crash.

The crashes are all cause by same reason per log files: Can’t find file for asset. /Script/HydraPlugin

Do you have any other solution on issue? Kindly lemme know :slight_smile:
[/]

is a weird bug, I am still not sure of the exact cause and will probably need to debug with some epic help sometime. In the meantime there is potentially a solution to your problem. Wrap up your hydra stuff into a blueprint actor component or a sub-actor. In there store the information you would like such as the hand positions/etc (also if its attached anywhere in the game e.g. your pawn, it will emit the input mapping events/keys), then reference those stored variables in your pawn classes. will have the indirection you want and avoid the C++ base class error. Its also a good level of indirection, allowing you to add additional inputs while referencing the same data structures; you are no longer strictly bound to the hydra.

[=;240330]
is a weird bug, I am still not sure of the exact cause and will probably need to debug with some epic help sometime. In the meantime there is potentially a solution to your problem. Wrap up your hydra stuff into a blueprint actor component or a sub-actor. In there store the information you would like such as the hand positions/etc (also if its attached anywhere in the game e.g. your pawn, it will emit the input mapping events/keys), then reference those stored variables in your pawn classes. will have the indirection you want and avoid the C++ base class error. Its also a good level of indirection, allowing you to add additional inputs while referencing the same data structures; you are no longer strictly bound to the hydra.
[/]

I tried to create an actor component named “HydraComponent” with variables storing whether Hydra was enabled and what was its orientation.
HydraComponent_BP.png
Put the HydraComponent into my character BP:
HydraComponent_BP.png

However even when I plugged the hydra controller in, the Event Hydra Controller Enabled was not triggered, so I restarted my project. time it showed an error of “Can’t find file for asset /Script/HydraPlugin” once started up, and the BP changed as below:
HydraComponent_BP2.png
As my further check, the HydraInterface which I added before into Class Settings was no longer there for no reason. I tried several times and every time I restarted Unreal the HydraInterface in HydraComponent BP would just disappear. :frowning:

Hi !

First off thank you so much for making plugin!! It’s been super helpful!

Was wondering if you would be interested a writing a similar plugin, which would allow a motion capture system to stream into Unreal?

Please let me know if sounds like something you’d be interested in doing and I’ll share details/budget with you.

Looking forward to hearing from you.

Thanks!

Hi all,

Does anyone have a blueprint that they would be able to share for first person controls with the Hydra? I’m not a coder so it would save me a lot of time in order to test a few things out.

[=maxwood;253175]
Hi all,

Does anyone have a blueprint that they would be able to share for first person controls with the Hydra? I’m not a coder so it would save me a lot of time in order to test a few things out.
[/]

To control in first person you can simply use the input mapping system where you can use the joystick and button controls to move the character around e.g.


There is also a rigged character provided by cleerusher123 earlier in the thread and guides on how to rig one up from about page 3. I plan to add a convenience rigged character to plugin maybe around next week.

[=;253786]

[/]

Since 4.7.4 (i believe that is the cause, but i’m not 100% sure) calling AddControllerPitchInput and AddControllerYawInput from an hydra delegate event doesn’t have any effect if there is no HydraActor in the Map/Level, while it use to work anyway before. it took me hours to understand the reason it stopped working.
I’m calling the methods from my HydraDelegate which is my PlayerController subclass, fron the virtual void HydraJoystickMoved, and it just doesn’t work, i’ve debugged it, the method and code runs fine, the Values are different from 0 and correspond to the inputted value, but it just doesn’t have any effect on the character, while instead, if i bind the Axis to the same method from “Engine Settings”, it works, and if i just call AddControllerPitchInput from anywhere else with any values, it works.

My editor is constantly crashing with plugin. using 4.7.4 at the moment but I had the same problem with earlier versions.

Does anybody know how to do something about it? makes developing kind of impossible for me (using hydra)

Hi ,

In the code’s API, I was not able to find ‘calibration’ related method in there.
What if I want to calibrate the initial position of the razer as start location at some location, what route would I go ?

I’m also trying to figure out calibration. Can you show us how to do it?

Hi, ,

I am getting error below.

I have created a ‘A’ class that is derrived from UOBject and FTickableObject.
and I created a ‘B’ class that is derrived from the ‘A’ and HydraDelegate.

Compile is working, date is all working good but somehow after around 20 seconds or so, it crashes with below messages.

MachineId:9EB1563042CDEFB5797C6DA20F58A34C

Access violation - code c0000005 (first/second not available)

UE4Editor_HydraPlugin!FHydraPlugin::DelegateUpdateAllData() + 34 bytes [c: rees\rs1\shootergame\plugins\hydraplugin\source\hydraplugin\private\fhydraplugin.cpp:277]
UE4Editor_HydraPlugin!FHydraPlugin::DelegateTick() + 87 bytes [c: rees\rs1\shootergame\plugins\hydraplugin\source\hydraplugin\private\fhydraplugin.cpp:327]
UE4Editor_HydraPlugin!FHydraPlugin::HydraTick() + 243 bytes [c: rees\rs1\shootergame\plugins\hydraplugin\source\hydraplugin\private\fhydraplugin.cpp:271]
UE4Editor_ShooterGame!HydraDelegate::HydraTick() + 146 bytes [c: rees\rs1\shootergame\source\shootergame\private\motionsensor\hydra\hydradelegate.cpp:136]
UE4Editor_ShooterGame!UShooterMotionCaptureHydra::Tick() + 50 bytes [c: rees\rs1\shootergame\source\shootergame\private\motionsensor\shootermotioncapturehydra.cpp:42]
UE4Editor_Engine!UWorld::Tick() + 4464 bytes [c: rees\rs1\engine\source\runtime\engine\private\leveltick.cpp:1171]
UE4Editor_UnrealEd!UEditorEngine::Tick() + 5618 bytes [c: rees\rs1\engine\source\editor\unrealed\private\editor.cpp:1329]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() + 22 bytes [c: rees\rs1\engine\source\editor\unrealed\private\unrealedengine.cpp:347]
UE4Editor!FEngineLoop::Tick() + 4179 bytes [c: rees\rs1\engine\source\runtime\launch\private\launchengineloop.cpp:2257]
UE4Editor!GuardedMain() + 1404 bytes [c: rees\rs1\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() + 26 bytes [c: rees\rs1\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() + 249 bytes [c: rees\rs1\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

[=JaeYoo;275831]
Hi ,

In the code’s API, I was not able to find ‘calibration’ related method in there.
What if I want to calibrate the initial position of the razer as start location at some location, what route would I go ?
[/]

part is now working. I just had to play with offset to initial data.