Image Update: Throw Physic


A glimpse of combat in 《Drifting》

Throw Physic


(most of the enemies possess armor/shield to block incoming attacks, once the armor/shield break down, players are able to grab and throw them around)

Grab, throw and shoot are the three moves players need to learn early on in order to advance through each level of 《Drifting》. Among the three, throwing is the hardest move to master due to its physical nature - unlike shooting and grabbing which only requires players' aiming accuracy - the throw mechanics take physical collision and velocity into account. The difference between the two is essentially line trace and projectile simulation in UE4's term.


(noticed the root bone is located near the hip of the character. If the root bone is set to (0,0,0) instead, the travel path of the mesh component during projectile simulation will appear to be lower than the desired travel path which makes the throwing appear to be "less accurate" - a lesson I learned the hard way)

Projectile simulation for a skeletal mesh instead of a static mesh (ex: bullet or arrow) poses several interesting challenges. One of the obvious challenges is AI behavior, after the projectile travel to its destination, unlike bullet or arrow which could be destroyed or despawn for later use, the skeletal mesh need to stop the physic simulation and resume back to its behavior tree and act accordingly - this transition phase is particularly important in order to maintain a realistic gameplay experience for players; another unexpected challenge is the skeletal mesh bone structure, I use SetWorldLocation to move the mesh component during projectile simulation and found out the component location is bind to the root bone of the mesh, which means the root bone cannot be placed at (0,0,0) but need to place near the hip bone of the character for visual consistency.

I hope you enjoy this week's update, have a happy and healthy weekend! :3 

IndieDB
Itch.IO

Get 《Drifting : Weight of Feathers》

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.