Steam VR Template

My sideline tangent from doing the networking integration paid off this weekend. I have a blueprint node capable of loading the workshop models applied to the persons SteamVR settings into UE4. It also automatically scales them to the WorldToMeters scale so that they are the correct size in game.

The function isn’t in the main plugin branch, it is in the networked branch.

kXYQ-YmLJGo

no collision

Hi,everyone. I’m using template 1.10 and unreal 4.12.2,and I’m using the example scene to develop some model. When I place something (3dwidget/static mesh) in the left controller, it don’t collide normally. Does it happened to anyone? Any help would be appreciate.
![YHN{5%X](%N4$I%Z]5ZZPO4.png|1040x806](upload://kBGovrIElYm9cByRQgO8RGdjK9L.png)

Hi there, I’m using template1_10,and unreal4.12.2, And I’m using the example scene to test some models of my project.I found that when I put something(3dwidget/static mesh) as motion controller’s child,it wouldn’t collide as normal. Has this happened to anyone before? Any help would be appreciate.
![YHN{5%X](%N4$I%Z]5ZZPO4.png|1040x806](upload://kBGovrIElYm9cByRQgO8RGdjK9L.png)

Speaking of networking, has anyone had any luck creating a session using this template?

I made a very simple create session demonstration in this album (Imgur: The magic of the Internet) that fails to execute in the game after I package the project.

Testing this problem in Paul Eckhardt VR template (Layx29lUziQ) and not having any issues, the create session problem seems to be specific to this template only. Could anyone replicate this in their project and see if they’re getting similar results?

@Proteus or someone else who know the answer

I’m doing some testing and in my game I would like the possibility to change the transportation methode. Now I can swap bewteen methode 1 and 3 but with the methode 3 your are like the methode name said : A ghost.
I would like to know how I can modify that so the player can walk on stairs etc (maybe even colide with walls).
I would like to know how I can change the acceleration ? because for now it’s very fast !

Thank you for your help :slight_smile:

You need to add “OnlineSubsystemNull” as a build dependancy in your build.cs file, otherwise it won’t package out. I assume that you have added some code to the project at some point and it has a .sln file, after the build.cs is generated you HAVE to add dependency modules to it or they won’t package out with the rest of the project.

I’m doing the networking iteration right now actually, templates don’t really have much of a way they could mess up a subsystem unless the config file had bad entries in it.

Hoping someone could pass me the correct steps for getting the MTeleportTarget to appear on the wiremesh cylinder. I can easily find and change the particle system if I want to but that cylinder I cannot seem to locate.

If needed I can provide an image with even larger resolution. :smiley:

By the look of it i think it is the Draw Debug Cylinder function :slight_smile:

I assume you are doing a trace for menu interaction? If so turn “IgnoreSelf” off as otherwise the trace will go right through you if called from within the character BP. When you “Attach” something it becomes part of that actor, so tracing from within that actors blueprint will by default ignore it.

Thanks a lot

There is currently an issue with grabbing actors that are scaled up/down in the world. I tracked it down today. In the GripActor function of the plugin, it sets the actor transform to the socket transform, but that includes the socket’s scale. In my case, I had some objects scaled up by 2, 2, 2 in the world, and it would scale them back to 1, 1, 1 when I picked them up, effectively shrinking them.

I’ll make the plugin use the actors scale when defaulting a socket. It could also be corrected for you by passing in a custom transform with the scale that you want.

Ah, that’s a good idea too :slight_smile: Thanks for all your hard work!

Do you know where that’s at so we can investigate a fix and do a pull request?

In the positional check function they cast the controller owner to APlayerController even though it will return the pawn/character it is attached to instead. Then since the cast fails it sets the Actor pointer to NULL, and for some reason returns LocalAuthority when the pointer is NULL. So every client thinks it owns the controller and pulls the local tracked controllers position.


bool UGripMotionControllerComponent::PollControllerState(FVector& Position, FRotator& Orientation)
{
	// THIS IS WRONG, it would have never worked!!!
	/*if (IsInGameThread())
	{
		// Cache state from the game thread for use on the render thread
		const APlayerController* Actor = Cast<APlayerController>(GetOwner());
		bHasAuthority = !Actor || Actor->IsLocalPlayerController();
	}*/


I replaced it with a pawn cast and check in my controllers


		APawn* Owner = Cast<APawn>(GetOwner());

		if (!Owner)
	            return false;
	
		return Owner->IsLocallyControlled();

Having it return True if no owner might be intended behavior since it could be attached to a normal actor but how it is in the default controllers it always fails (true).

Whenever I pick up and turn on the lightsaber my editor crashes. Is this a known issue?

@Diem the speed of the ghost mode can be adjusted in the Ghost mode nodes. You’ll see a float (1) next to Ghost vertical. If you decrease or increase the value it will adjust speed. You control the direction following the direction of your left controller.

By default, because the map is horizontal, I constrained the ghost movements to the z plane. To change that, go to the FloatingPawnMovement component, under “Planar Movement” and try different things. You’ll find also there the max speed and acceleration (under floating pawn movement).
@anonymous_user_fa45b46b I’m in the process of stripping down the template, and rebuild it with multiplayer in mind. Should find a way to make it works.
@JHalper It is a draw cylinder function. I find it less resources hungry than particles or other fancy things. You can make it invisible and rather use particles or other cool things. Just remember that particles often look ok on the monitor but not in VR (e.g. not rendered in stereo) and avoid at all cost transluscent materials, often found in fancy teleport animations. Replace all your transluscent materials with masked/dither temp AA mats. Vive don’t like translucent.

I think I’ll put the last advice first in the docs. I have archviz demos that, when glasses are made of translucent mat, fps are 40, and when replaced with masked/dither temp AA, fps are 90. With no noticeable visual difference.
@QFGlenn No issue. I tried 1.10 extensively before and it works fine (1.10 and 1.10.1). Try using latest plugin and UE4.12.4 and it should work fine I just tested it 5 min ago. There is only 3 issues I noted since the release: 1) For whatever reasons, in Vive_Pawn/Teleportation nodes, I did not connect Is not Valid to Call Out Platform. Connecting it will allow exit platform 100% of time 2)I forgot to put a Stop Camera Fade when BlockingVolumeEnd Overlap in level bp: doing so will stop the fading vision when overlaping the no teleport zone and 3)I skipped the ForEachLoop function in the SpawnPoles in Vive_Pawn: this is essential to spawning poles around chaperons boundaries. Fixing these 3 things take 2 minutes so I did not make another release.

Thx Proteus :slight_smile:

What do you think if we change the parent class of the “vive pawn complete” bp from pawn to character ? I think it can solve collisions in “free mode” and then we can use CharacterMovement instead of FloatingMvnt.

@Proteus

My current test project for multiplayer has no default pawn and in the game mode OnLogin asks the user if they have a HMD or not (RPC). On answer it either spawns them a VivePawn or a FPSPawn to control. This way testing multiplayer is still technically possible for the most part with only one headset. The FPSPawn I use I attached a GripController with “UseUntracked” true on it so it can perform gripping and other VR functions.

Everything positionally is working correctly right now with being able to see the players move around (had to manually track headsets too…might make a camera override or scenecomponent that auto replicates hmd position…why not at this point). I have to open up the gripping itself to replication now, there are some caveats that I am still thinking through and I am pretty sure it will end up working two different ways depending on the style of grip. Ones that collide with the environment really should be checked by the server, ones that are “attached” to the hand and only have OnHit and not physical collision should be fine to be fully client side positioning with OnHit sweeps being on the server.

I am also working on a VR function library that adds some missing features in, due to the somewhat hackish current state of openVR in engine it is itself rather forced together and being cleaned up as much as possible.

I have the week off of work next week, I plan to buy a metric tonne of redbull and enjoy myself coding for once, should get a lot .