Inspection System

 To properly show the purpose of my museum I needed to make the inspection system for my assets. Showing the functionality for this system is the beginning of bringing this idea of a virtual tourism/learning tool to life as well as adding purpose to the high detailed Middle-Earth assets from the last semester.


To start, I used a basic 'Switch on Enum' node to ensure I could reuse this one blueprint without creating copious amounts of child blueprints.


 I also created two bools to accommodate the varying sizes of the objects; 'Is Large' and 'Is Small'. Now moving to the first person character blueprint, I added three sphere collisions at varying distances from the camera just to mark the 3 possible locations the object could move to.

Using a basic line trace I am able to set an actor variable as the hit object and then if that object is an inspectable object blueprint perform an animation that brings the object out of the location of one of the three sphere collisions.



There has been some improvements on the initial system with the addition of the 3 different locations based upon the objects size but on thing I would like to add just to streamline the movement is always have the object appear in front of the character facing forward no matter the angle of the camera but this is a minor detail that I can figure out later.

One addition I did make was adjusting the depth of field upon inspection making the object the sole focus of the camera. (I have the inspection depth of field change again depending on the size of the object)

The HUD I have setup using editable text variables in the object itself. This is currently using the basic UE4 HUD assets but again is another that can be changed later as I am currently just focused on functionality.


Rotating the object is done using 2 functions; one for roll and one for yaw. I have set it to only be rotatable while right click is held and before either of the functions are called upon it checks whether the character is frozen (a bool that locks the camera rotation and character movement once the item blueprint has been hit). In the function I chose to make the rotation controls inverted just because that feels more natural to me personally.



There is a minor issue with the way the object rotates and I am unsure if this is fixable. I would like fire a new rotate axis through the object every time right click is released in order to keep the mouse movement intuitive. Currently pushing up on mouse causes the object will rotate along the actors relative forward vector regardless of its world rotation. I would like to somehow set a new forward vector of the actor or something that would act as a substitute.

I am happy with the current situation of this system as any tweaks made now will be very non-disruptive to the setup and it allows me to implement any future work instantly into the environment and set up all of the HUD information ready to go.


Comments

Popular Posts