-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add weighted logic to collision hands #695
base: master
Are you sure you want to change the base?
Add weighted logic to collision hands #695
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setting max pickup force on the collision hands to 250 gives better weight feel, however it somewhat feels disconnected.
for a sniper rifle, an empty one without scope would weight around 5.4kg/12lb.
snap rotation is not working properly with weight, the object lags behind and makes the hand that got the object picked up, lag behind in a twitching way.
not sure if its related but i cant properly grab the sniper handle, it disconnects as in not being able to fully grab it.
will have to play more with this pr but it is a good start.
f7baa24
to
4b40a7b
Compare
If the object you pick up is too heavy that it lags behind too much, we'll eventually let it go. One thing I do need to fix here is that player movement is added into this as well. |
5b0c0fa
to
ad42217
Compare
Player movement is now directly applied to collision hands (and poke body while I was in there) including when you use teleporting. The only scenario where we're not automatically reacting is if the player is moved outside of the player body methods (a few movement providers do this) but I need to react differently depending on how the player is moved. |
right now even with your settings its not acceptable, upon performing turn movement it twitches and it seems that your recent changes made the still movement of the hands when holding, twitch just a lil as well and i think this wasnt the case before. |
Hmm, I wonder why its that much more stable for me and what I've missed. Malcolm also noticed that because we're now properly testing for collisions, we're getting into trouble when we attach items to snap zones that bring collisions close to the hands, such as adding the scope to the gun. |
indeed, its a hornets Nest.. |
This is an implementation of weighted hands based on the current logic for holding objects in XR Tools.
It's far from perfect but it does a decent job within the current constraints of XR tools.
The main missing bit that would be an improvement is missing angular momentum when an object is held in a single hand (as dual wielding already compensates to an extent). But in order to do so we really need to tie properly into the physics engine and that requires a completely different type of logic for holding objects (I have been doing experimentation for this and may implement that approach for XR tools 2).
The other shortcoming is that when the user teleports, the movement breaks the maximum distance and we let go of the object. This I plan to resolve in a follow up PR as this requires proper signals being hooked up to our teleport system and I'm already planning work on this.
Contributed by Khronos Group through the Godot Integration Project