Published in


First-person animations land in Crayta!

Yet another incredible, highly requested feature arrives in Crayta for Cursed Galleons — hands and feet in first person!

Watch this video to discover how first-person will look in Crayta!

Hi, I’m Barry, I’m a senior programmer here at Unit 2 Games, and I’m very excited to share some news about one of the many new features being released in Crayta!

Until now, the first-person mode in Crayta has been not too dissimilar from the standard 3rd person view, we just nudged the camera in a little closer and hid the character. This is why you saw a floating gun in front of you when playing games like Prop Hunt — that gun was still attached to your invisible hands.

Well, it’s my pleasure to announce that Crayta now fully supports a fully-fledged first-person mode! Our animators have been hard at work recreating first-person versions of our character animations, and I’m sure you’ll agree from the video above that it’s looking awesome!

Holding a pistol will feel so much better!

How can I add this to my game?

Good news — all games that previously supported the old first-person view will automatically upgrade to this new and improved version!

All the old rules that dictate whether the first-person view can be activated in your game remain the same, i.e. you set the Forced Camera Perspective value on your Player template to allow only 1st or 3rd person, or allow both views.

If a game supports first-person, you can activate/deactivate it by adjusting the camera zoom level using Page Up/Page Down on the keyboard, or pressing the Select button on the gamepad.

You can also alter your preferred default camera zoom level from the general options menu, so you needn’t bother having to re-select first-person every time you enter into a new game.

Find this in the settings tab in the menu

Why did we do this?

It was clear from the start that our existing first-person view could be improved upon. Our main goal was to give the players a better experience while in this view as well as bring a more polished look and feel to the game. We wanted to better communicate to the player what weapon they are holding, what state they are in and what action they are doing at all times.

We also found that aiming while in first-person was not helped by the weapon either being off-screen or poorly positioned. To solve this, we spent time posing each grip type and grip state so that there was a clear line of action that travelled down the weapon to the reticule. While these changes are only visual, they should subconsciously help the player to draw their focus on the centre of the screen.

Comparison of first person posts, before (left) and after (right)

Tips and Tricks

Lua Functions

We’ve provided a couple more Lua functions that will get called on the player/user whenever the first-person camera is toggled, called LocalOnFirstPersonStart, and LocalOnFirstPersonStop

You can use these for a multitude of reasons, perhaps to display first-person-only HUD elements, or in the example in the images below, hide/move the bulletproof vest mesh that’s attached to the character, which could otherwise slightly obscure the view in first-person:

Example of how to use the Lua functions, to hide a vest that would block the first-person view. The right image shows the view from 1st person.

Forcing 1st/3rd person camera

At any time, you can force a player into the 1st/3rd person camera view by adjusting the value of forcedCameraPerspective on the player (forcedCameraPerspective = 0 for noRestrictions, =1 for first-person only, =2 for 3rd person only).

If Player A is currently in 1st person mode, and Player B is in 3rd person mode, and the game forces all players into 1st person only, then both Player A and Player B will switch to 1st person. If the game subsequently allows both 1st & 3rd person views again, Player A will remain in 1st person, but Player B will automatically switch back to 3rd person because that’s what their last desired camera view was, which is a view that is now permitted.

Take a swim — we’ve got amazing animations for that too!

Consider the animated first-person camera

In some situations, we felt it necessary to take control of the first-person camera and force it to look where we want it to, for example when mantling, which you can see in the video at the start of this blog.

As has always been the case, you briefly cannot move while your character pulls themselves upwards during a mantle, but we often felt this was a confusing experience in first-person. Depending on how the camera was oriented, you may not see much of your character, so it’s not always immediately obvious why you suddenly can’t move and start to drift upwards.

The answer — we now animate the camera during mantles in first-person view, which allows us to force the camera to look at your hands as you pull yourself up. We’ve built in a little bit of leeway into this to let you look around a little during this time, but you certainly won’t be able to look 180 degrees behind you.

It’s worth bearing all this in mind for the games you create because players in third-person will be able to look all around while mantling, but those playing in first, can’t; which might give a competitive advantage.

It’d be up to you how to handle this (should you feel the need to). One suggestion could be to force the player into 3rd-person view when mantles start (OnMantleStart), and allow first-person again when the mantle comes to an end (OnMantleStop). This is what happens when you emote.

— — — — — — — — — — — — — — — — — — — — — — — — — — -

Join the discussion on Discord and Twitter!

Crayta is FREE to play and create on Stadia and Epic Games Store!



Posts by Unit 2 Games staff, mostly about Crayta

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store