This week I focused on blueprints in Unreal, one of the main
parts about the Alice in Wonderland is that she grows and shrinks throughout
the story. I tried to make the growing and shrinking into a mechanic in the
game, for instance the player would come across a small hole and would need to
become small to fit through.
To make the player character grow and shrink I set up three
meshes of the character in the character blueprint at three sizes (big, medium,
small) and made it so that only one of the three meshes would be visible at one
time. As a test to begin with I assigned each size to a button press 1, 2 and
3. So pressing 1 would make Alice small, so the process would be:
Press 1 > Set medium and big mesh to invisible > Set
small mesh to visible
However this had a problem, the collision mesh for the
character did not change. As a result of this if you turned to small Alice you’d
be floating in the air and if you turned into big Alice then you’d be walking
through the floor.
To fix this I added another part of the blueprint which told
the collision mesh of the character to change size with the different mesh. So
if you were to press 3 to make Alice big the process was:
Press 3 > Set medium and small mesh to invisible > Set
big mesh to visible > increase collision mesh
But surprise surprise there was still a problem with the
blueprint. When you increase the collision mesh’s size it increases from the
centre outward, so when you turn big from medium the collision mesh goes into
the floor and so does the mesh still.
To fix this I needed to elevate the player before the
change, the simplest way to do this is to get the character to jump when it increases size (this goes for changing from small to medium as well as medium
to big).
Press 3 > Jump > Set medium and small mesh to invisible > Set
big mesh to visible > increase collision mesh
But then there were still problems. When I went from small to big the
character wasn’t jumping high enough, and if I just increase the height of the
jump when you press 3 then you’ll jump a ridiculous amount when you’re medium
going to big.
To fix this I added variables which prevented the player
from skipping a step between big and small, you always have to go medium before
you go big. Next week I’m going to look into how to make the changes
situational.
This week wasn’t all boring and blueprints, I made our
blockout in engine (yey!) all with illustrated diagram to show what we are
willing to cut if needs be.
No comments:
Post a Comment