lunedì 9 gennaio 2017

Unreal Engine 4.14 w.i.p. - flying vehicle

 "Flying Vehicle" is a personal project done in my spare time while studying game engines and VR.
All "BluePrints" are built from scratch without using presets for the sake of learning.



building blueprints

 Underneath the vehicle "static mesh" has been created four points, the "hovering points" that check for the distance of the vehicle from the ground.

 These points are built in a "scene components" blueprint and then added to the "pawn" blueprint.
The 4 images below are actually one single blueprint, the "scene components" one, and they represent the algorithm that checks for the ground distance/hit.
Two float variables are added: "trace length" and "anti-G" (pretty simple explanatory)
The IF condition (UE branch node) checks for the distance from the ground. If it's higher of the value set in the condition (in this case 46) means the "pawn" is flying and assign different physics behaviours. 


 In the "pawn" blueprint the "hovering points" are initialised as follow.


WASD/IJKL basic moments

 All movements are under the condition of the "antiG switch", only when is active player would able to move up and down as well as shifting left to right without turning. The switch is also used for landing and take off.




Nessun commento: