Forum Discussion
Anonymous
7 years agoAdding weapon kickback to the avatar hands?
Hi there! I'm trying to add some kickback from projectile weapons (to simulate a muzzle kick), but whenever I try to add a rotational force to the avatar hands from the Oculus Integration, nothing at all happens. I checked to make sure there was a rigidbody component on the hands, and that the rigidbody was not set to kinematic. Any and all attempted rotation changes to the hands seems to be completely nullified. Is there a way around this?
3 Replies
Replies have been turned off for this discussion
- MikeFTrusteeYoul have to add an interupt into the avatar pose update loop otherwise all transforms will be derived from your touch controllers. So the basic implementation would be something like this:
-fire gun
-pause pose update on relevant hand
-copy and apply last pose transforms (otherwise they will be set to 0,0,0 in local space)
-apply your kickback animation (canned or procedural via physics in your case)
-wait until kickback completes
-re-enable pose updates - Anonymous
MikeF said:
Youl have to add an interupt into the avatar pose update loop otherwise all transforms will be derived from your touch controllers. So the basic implementation would be something like this:
-fire gun
-pause pose update on relevant hand
-copy and apply last pose transforms (otherwise they will be set to 0,0,0 in local space)
-apply your kickback animation (canned or procedural via physics in your case)
-wait until kickback completes
-re-enable pose updates
Ok, that makes sense, thanks. I'm new to using the Oculus SDK, so I'm not entirely sure where the pose update function you're referring to is. I assume it's the 'UpdateTransforms' function in OvrAvatar, right? - MikeFTrusteeYeah you got it
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago
- 2 years ago
- 6 months ago
- 6 months ago
- 5 months ago