Hey ! First of all i want to thank you for a great book. Second i want to ask you about a problem.
I Could not figure out how to do a drawer or a door so i made them exactly as you did on your VR template to see the formula etc you used.
It works fine exept when i release them with a high velocity (Aggressive) , then the drawer buggs out completly and the door instantly snaps to max or min Yaw deppending on rotation angle.
The wierd thing is that they both work fine when i move and release them slowly , low velocity.
I have everything set up from your book exept im using a character that can move around with the touchpad instead of a pawn.
Do you have any idea what could be wrong?
EDIT!! SOLVED!!
Nevermind It was just that the Dragging Boolean in the WorldInteractor component wasnt unchecked
Hey I have another, more technical question. I’ve got some pickup actors modeled after the interactive static mesh actor and I’m using an attach to component node in another blueprint to allow the player to attach the pickup actor to a mesh on this blueprint. With weld physics bodies checked on the attach to compenent node the attachment behavior works perfectly but when I go to pick the object back up, which I want the player to be able to do, the physics seems to be disabled in that the object will track with the motion controller on drag but will not rotate with it and when i let go of the object it hangs in space. Its like the interactor doesn’t quite take full control of the object again. Im sure weld physics bodies is part of the issue, unchecking does not produce this problem but it also does not give me acceptable attach behavior. I wonder what can be done to ensure the pickup object cleanly detaches from this parent mesh on pickup. I’ve included a screen shot of this node if it helps.
It’s hard to say just by looking at that screen shot, have you had a look at how it works with the Content Examples?
I have this object VR_World_Interaction/Blueprints/InteractiveObjects/BP_InteractiveStaticMeshActor that drops and everything and also handles late updates and maintains collision when in the hand (however to do this is blueprints means the code is more complicated than it should be)
Another alternative VR_World_Interaction/Blueprints/InteractiveObjects/BP_InteractiveStaticMeshActorConstraint uses UE4’s physics constraint to attach the objects this doesn’t work with later updates but will maintain collision when held
I have been reading through your book and had a question about something you didn’t cover. I think I have asked this a long time ago but I thought I would again. Regarding your jogging in place logic in the book, how can we handle collision of the artificial movement if the player is not standing directly in the middle of the play space? Basically, since epic has released their vr examples has their been any headway in allowing people playing in roomscale to collide with static meshes without needing to use C++ plugins?
Multiple people have implied that it is possible but I have never actually seen examples of this. Is it possible to do the same thing for the player character collision that you do for held objects (leave simulate physics on but turn linear and angular damping up really high so that a child of the root, but in a different position relative of it, can collide with non-simulating geometry and work as character collision)?
This is the #1 problem I have with UE4’s VR implementation and I think it stems from the character movement component being incompatible with roomscale VR.
I’ve modified the drawer BP in order to move the object in XY and it’s working very nice, but what I would like to add is the possibility to aim towards the object and be able to interact with it from a distance, rathet then using a box collider which is enabled once the sphere is overlapping.
In short I would like to do something very similar to what is the default interaction ( move/ritate/scale ) while using the editor in VR ( build VR in VR ), meaning that I have a kind of ray which allows me to select an item, and as soon as the item is selected the gizmo with the different move/rotate/scale options appear.
Is it something which requires a drastic BP change ( or completely different BP setup for the interactive actors ), or it can be easily added as a second interactivity options without going mental?
I haven’t looked into it yet, sorry, I’ll put it on my list so when I get the time I’ll see what I can do
Umm, I do have the trace interaction component in there already but that would mean you had to re-do the drawer
So in the world interaction component (BPC_WorldInteractor) you could simply pass the results from a trace into the FindActorToHover method here:
Seeing your use case however I might go and abstract the interaction even further so you can have trace interaction and world interaction with the one example, but that might be in a little bit so the method above will probably be a better option for now
I found a possible work around. What I did was spawn a dummy character with a movement component on begin play. When the player presses on the track pad I send that value to the dummy for movement and update the VR player’s root relative to the camera position based on that. When walking around roomscale I set the dummy characters position to the camera positon (with some math to get it right). This is kind of a hacky work around but it works really well and doesn’t seem to hit performance at all.
The neat thing is that even if you are walking around the room while using traditional movement the dummy character will still be in the right position.
You have to watch how you are moving the “dummy” character though if you intend to handle multiplayer with it. Just adding world offset or moving it outside of the movement component will incur positional errors with the server even if you replicate the movement over.
This is due to the movement playback system that the CharacterMovementComponent uses to handle server authority over client movement and the fact that the played back movements will be out of order with manually replicated ones. You can run totally client authoritative if you wish, but that has its own issues.
You’ll also want to handle both movement component movement while moving in the tracked space as well.
However all that being said, that is the approach I suggested to Jonas for him to attempt to handle BP only characters with VR, it should be the most workable solution.
I’m having some issues with the cartridge example ( World interaction map ), and I’m not sure why it’s happening.
If I just duplicate the Cartridge BP and put it into the level, I’m not able to snap it into the Cartridge holder, even if I set the ID as the existing cartridge in the level…virtually it’s an exact copy of the existing BP, but one works without any issues, while the duplicate one doesn’t.
I have 3 different pieces I want to use for 3 separate holders, but I’m not able to duplicate the existing BP and use it for my purpouse.
The Cartridge holder only works with the Cartridge BP at the moment because it has an explicit cast to the Cartridge BP so it can get its details, saying this if you wish to create a new blueprint that works with the holder just make sure it is a child of the Cartridge BP
This is a very good resource for learning UE4 as well as VR!
I’ve got a problem I’m hoping has a simple solution. Here it is:
If i duplicate the whiteboard, and try to draw on one, the markings show up on both. If I duplicate/replace M_WhiteBoardClearMaterial, M_WhiteBoardMaterial and RT_WhiteBoradRenderTarget, the markings only show on the first board, but the second can’t be drawn on at all. Any simple way to have multiple whiteboards that all work individually?
Hey ! I’m trying to make a simple box/chest that i want to open just like in real life. I´ve tried using the door-template and just rotate it to look like the top of the chest. The problem though is that the door is programmed to not be affected by gravity, and obviously the top of the chest needs to be affected by gravity if you just open it and release midway.
I´ve tried programming the effect of gravity (cant simply just use the gravity in the physics settings, because it’s not a physics object, but i havent managed to make it work 100% smooth, (it works soso, hard part is to make the top fall backwards or forwards smoothly when around 90 degrees).
Do you have any directions of how to modify your code to enable a chest like this? Thank you for a great VR-template!
Great template and book. Lots of great info. Thanks.
I’m new to blueprints and am trying to use some of your examples in a project based on UE4’s VR Template with the robot hands as controllers. Is it just a matter of replacing the references to BPC Interactors with UE4’s BP_MotionControllers? Any help would be appreciated.
Hmm I believe it should work, I’ll put it on my list of things to look at when I get some free time and update you when I do
It should be similar to the door, I’m thinking of converting some of the world interaction stuff to using physical constraints just because it might be a little more expandable without having to do the physics code yourself, I’ll put it on my todo list for things to look at for the examples
I personally don’t like how the official one is set up as it doesn’t really allow expandability so it can bite you down the line when you want to do more then what it already offers.
I also don’t think the idea of a VR template really makes sense (I’ve talked about why here), it does look pretty though, haha.
Saying that the Content Examples aren’t perfect, it doesn’t really support multiplayer (yet haha) and it’s hard for me to dedicate my full attention to them as I have a pretty full schedule these days (although looking at the rate of updates to the official template it looks like that may true there as well) but the Content Examples are also open source so I’m pretty open to pull requests if there are any problems that people fix or features they add.
If it’s a UMG widget then the keyboard should just work
The two projects aren’t really compatible it would probably be best to just import the hand meshes into the Content Examples
Hey, sorry, I don’t think my publish does this, but I’m definitely compiling any suggestions/changes to make into a 2nd edition down the line but if there are any problems feel free to message me and I’ll have a look (I will most likely add any changes needed to the Wiki on the so everyone can benefit)
Ah, ok. I received the book btw. I like colored pics and the layout (only had a chance to skim through quickly) :o
I skimmed over the interactions, but I don’t recall seeing if player can pull the lever “physically” (as in real life, where lever would rotate with the hand). Am I overlooking it or did this kind of stuff not make it into the book? (something tells me it’s in the book and I just need to pay attention)
Also wondering if it would be hard to make all the stuff in the book support multiplayer.