Petting detection


The first technical issue in this project is moving the hand along the body using colliders and raycasts on an animated character. There are 3 possible solutions for it:

-The most obvious is to aproximate the geometry using primitive shapes. However, while this may work for hit detection in a shooter, our case is more complicated. I need to orientate the hand over the surface of the creature and for that I need the normal of the ray cast impact. The primitives must aproximate REALLY well to the geometry or the hand may hover too far, clip into the model, or go crazy at the junctions.

-Use the 3D model as a collider and keep updating in to match the animations and movements of the creature. This seems to be resource intensive but gives the best result.

-Avoid moving the model during the petting phase. The creature would look less lively but is not as bad as it sound.

For now I am sticking with the second one, update an exact match of the visual model. It does take a toll on the processor but for a PC is easily manageable. For other devices may be necessary to go with one and smooth the hand movement somehow.

Leave a comment

Log in with itch.io to leave a comment.