Originally posted by Fantasifall
View Post
Announcement
Collapse
No announcement yet.
VR Expansion Plugin
Collapse
X
-
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
-
Originally posted by mordentral View PostIn this case the behavior you want would be automatic if you use attachment instead.
Comment
-
The console log will say why it failed to grip the object.
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
Comment
-
Originally posted by mordentral View PostThe console log will say why it failed to grip the object.
Comment
-
Originally posted by Fantasifall View PostI didn't even think to look there. It says that it's always called by the client, event though I use an authority switch and specifically call event on server. Worth noticing that I'm hosting a listen server and the client I'm playing as is the host. Afaik there is no limitation to using a listen server?
However this is not set until first tick (this is when the engines default controllers decide locally controlled as well). So I assume that your grip code is taking place during Begin Play? Which is prior to when the controllers start checking for their owning state and net state.
I can probably just set it on begin play as well (there aren't role transitions), I think that the blueprint event for it should fire after the controllers code event. I didn't anticipate people gripping objects prior to the players actually controlling the pawn.
Prior to a code change though you can spawn it sometime after begin play and grip, or just attach instead since you didn't plan on using the grip functions.
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
Comment
-
Originally posted by mordentral View PostPrior to a code change though you can spawn it sometime after begin play and grip, or just attach instead since you didn't plan on using the grip functions.
I use the vive controller mesh as the root to then align the gun against, and since a scene component can't be the root it works with one caveat: The physics collision during grip only seems to account for the root mesh's collision?
I can work around the issue with begin play by just adding a delay, so don't change just because of me. Thanks!
Comment
-
Originally posted by Fantasifall View PostI did get attach to work on begin play. I also tested to grip after begin play on player input and that worked as well with some minor interesting issues. It was resolved by checking "Generate Overlaps" on the root component of the gripped actor.
I use the vive controller mesh as the root to then align the gun against, and since a scene component can't be the root it works with one caveat: The physics collision during grip only seems to account for the root mesh's collision?
I can work around the issue with begin play by just adding a delay, so don't change just because of me. Thanks!
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
Comment
-
Originally posted by mordentral View PostYeah no, it is definitely in the grip function, you need to pass in the transform of the actor you are gripping, not the transform of the motion controller, if you want it to snap to the controller then use a "MakeTransform" node and leave the location as 0,0,0 and tick the "Is already relative" checkbox, but you will need to fill in the Scale part of the transform with the scale of the actor you are trying to grip.
With how you currently set it up you are creating an empty transform with only a location set so it is defaulting the scale of the gripped actor to 1,1,1.
I allow it to change the scale of the gripped actor specifically because it is handy sometimes to say add a 25% scale increase to held items (papers/tablets/ect).
Thanks a lot
Comment
-
Originally posted by kamesan View PostHello,
Any chance to share a empty scene correctly setuped?
It will help a lot newb like me.
plug/unplug and see what happens is the poor way to learn when you have a flat brain.
finger crossed.
Regards,
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
Comment
-
Pushed new commit live from test branch, this is a fairly important one as it makes certain interactions far easier to create in VR.
Code:10/26/2016- Physics grips overhaul + new grip style Overhauled the interactive physics grip, should be cleaner and more stable now, also takes root bone rotation into account now so that in 4.14 and forward gripped items always look correct (4.13 bug prevents it in there). Added new grip style "Manipulation Grip", this grip isn't meant to pick things up, rather it is a physics constraint grip meant to be used for interacting with constrained items like doors/drawers/levers/dials/ you name it. Should make creating interactive physics based items far easier in VR.
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
Comment
-
Hi,
Having difficulty while attempting to SetControlRotation while using the VRCharacter. I understand this is a UE4 bug everyone figures out their own work around for eventually, but I am hoping to get a "best practice" here. Perhaps a custom "SetControlRotation" for the VRCharacter would be possible or worthwhile?
I have "portals" which should reorient the player to face a chosen direction upon teleporting.
Warm regards,
PS Here is the issue I referred to: https://issues.unrealengine.com/issue/UE-21676
Comment
-
Originally posted by The Revera Corporation View PostHi,
Having difficulty while attempting to SetControlRotation while using the VRCharacter. I understand this is a UE4 bug everyone figures out their own work around for eventually, but I am hoping to get a "best practice" here. Perhaps a custom "SetControlRotation" for the VRCharacter would be possible or worthwhile?
I have "portals" which should reorient the player to face a chosen direction upon teleporting.
Warm regards,
PS Here is the issue I referred to: https://issues.unrealengine.com/issue/UE-21676
HMD rotation is based locally off of the player rotation, set the actor rotation instead.
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
Comment
-
Thanks for the follow up, I did attempt setting the player's rotation as well and it did not work for whatever reason. I know that traditional Teleport blueprint node rotation seems to work with the VR Template 4.13/4.14 setup though, so maybe there is something I keep missing,
In any case, I came up with a solution that is working for me, I'll post it here in hopes that it can help someone else and maybe make more clear what my issue was.
Comment
-
Just pushed a new commit, also detailing previous un-mentioned changes.
Code:11/03/2016- Physics grip re-overhauled Changed Interactive Grip with Physics to use the gripped objects Center Of Mass as the gripped location, this adds a ton more stability to gripped objects and essentially makes this grip style feature complete. This has the consequence of the focal point of interactions being at the center of mass but over all the grip is far better off for it. Now rotating the gripped physics object by the root bones world rotation (if a skeletal mesh), this corrects a rotational offset in 4.14 when the root bone of a gripped object is not rotated with the world. Removed Interactive Grip with Velocity - After going over it with many different iterations I just don't think that it is possible to get this style of grip stable without a Fixed Physics Frame Time, Unity directly calculates velocity because they know the exact time between physics ticks so they can depend on the next tick being the same duration. With variable stepping in UE4 I can't do that so direct velocity control of objects is far more uncontrolled. Also now that the Interactive Physics grip is more stable there is less to no need for this grip. Added constraint break distance to Grip Interface, if passed in a value > 0.0f with an interactive grip, the object will be automatically dropped (using grip interfaces SimulateOnDrop() value) if the distance between the grip and the object itself exceeds that value. Added "GripObjectByInterface" / "DropObjectByInterface" functions to the GripControllers. These take either an actor or a primitive component and grip them by the properties passed in from a grip interface. These functions fail if the object to grip does not implement the gripping interface. Eventually I would like to turn all gripping into GripObject instead of GripActor/Component but I am retaining the legacy nodes for now so as to not break current implementations. Added Grippable Static Mesh Actor which fully implements the Grip Interface and has public accessible variables to set for the interface. You can pick them up with "GripObjectByInterface" and they will handle themselves. (Good use case: place in level, set mesh to a door, constrain to a wall, set interface to use manipulation grip and no late updates, working door). Added GrippableStaticMeshComponent which fully implements the Grip Interface and has public accessible variables to set for the interface. You can pick them up with "GripObjectByInterface" and they will handle themselves. *TODO* Add grippable collision primitives for interaction points on actors.
Last edited by mordentral; 11-03-2016, 09:53 AM.
Consider supporting me on patreon
My Open source tools and plugins
Advanced Sessions Plugin
VR Expansion Plugin
Comment
Comment