Download

Motion control snap-to location conditions?

As an artist with very little programming skill, I keep hitting up the “I know what I want to do, but don’t know how I’d do it”.

I’m working on a very simple ‘catching’ game for motion controllers. I’m using the VR template setup in 4.14.

Currently, I have the Location rule set to ‘snap to target’ and I like how it feels (I’ve also increased the grab sphere - so there’s some ‘cheating’, but it feels natural when playing).

My goal is to have the objects you are catching snap to the target at at different rotations depending on the angle they were caught at. I’d like to have 3 or 4 catching animations, each at a different “rotation of catch”. I have no idea how about going about this in BPs. I’m assuming I would have to get the relative rotation of the object at the moment of catch and then play the corresponding animation. So, of the rotation of z is between -15 and 15, playing ‘head on’ catch. Less than -15, left facing catch. Etc.

Also, if I get ambitious, for larger objects, I’d like to have three different snap to points - playing an animation for the closest catch point.

If you can offer any insight about how to approach this, that’d be awesome!