Newbie jumping in at the deep end!

HI all,

As a complete newbie to Unity I’m hoping I’ve not bitten off more than I can chew on my latest project. Thus I’m looking for a few pointers, so thanks in advance for anything that’s forthcoming.

Basically I’m looking to take mocap data from Optitrack LIVE and map a rigid body to an asset in Unity. Now I’ve done all the tutorials and have got exactly that working, great! However, having very limit experience Unity itself I’m trying to understand how I can get the physics engine to take over the animation of that asset should it exit a specific 3d bounding box.

Imagine for example a drone flying within 3d space (real world) being mapped into a corresponding 3d space in Unity, however if the drone were to fly out of the mocap area I’d like to have unity continue to plot the rigid body location based on the final trajectory as it crossed the limits of the bounding box.

Make sense?

Is this even remotely possible and if so does anyone have any pointers on where to start/what to investigate?

Thanks again,

Nathan

So you want to fall back on dead reckoning when out of optitrack fustrum?

I would use physics for when flying then when outside tracked volume set it kinematic and set it’s velocity to be last known velocity.

If it remains outside tracked volume you may also try slowly reducing that velocity to some small level over time.

Then when it comes back into tracked volume you can lerp to the live track to stop any abrupt glitches.

If you have API access to IsTrackingOK or something similar then use that instead of defining a bounding box.