Categories
3D Computer Animation Fundamentals Immersion

Unreal Engine – Immersion Project – 32 – Player Blueprint

Just gonna go over some of my FirstPersonCharacter blueprint functionalities here

Looking at my blueprint setup, I’m using several “Cast To” nodes to handle the interaction widget display. The line trace by channel detects what the player is looking at, feeding into Cast To Curtain, Chair, BP_PlaySocket and BP_Bed nodes to determine which object was hit.

I’m using tag checks through a break hit result node to identify different interactive objects – curtains, chairs, switches. For the curtain, I added a boolean branch that disables the widget prompt once the animation plays. It’s nice when interaction prompts aren’t shown for something that’s already done its job.

This part handles the camera shake that happens when the player moves around, triggered on tick based on their velocity.

Looking at this camera sequence setup for the bed interaction, I’m using a combination of view target blending and post-process effects to create a smooth first-person transition. Working with Set View Target with Blend gives me that nice smooth camera movement – I’ve tuned the blend time and transition to feel like natural head movement as the player “climbs” onto the bed.

The camera setup uses post-process nodes linked together for the fade effect. Make Vector 4 nodes control fade values and timing, with delays making sure the fade finishes before camera movement starts. Pretty standard stuff, but effective for what I need.

For bed interactions, I’m tracking player position with Get Actor Location, then using Set Actor Relative Location with a Make Vector to mirror their original position when they get out. It gives that natural feeling of actually climbing out of bed rather than just leaving it facing in the same direction as when you got in.

Using Toggle Visibility nodes connected through a Cast To BP_Bed, I’m switching between two duvet meshes – one that’s visible when the player’s just looking at the bed, and another that appears to cover them when they’re in it. Added a small 0.1 second delay to ensure the game properly initiates this code since it decides to just misbehave sometimes.

The BP_Duvet reference and Set Control Rotation nodes ensure everything stays properly aligned during the transition. Really happy with how natural this makes getting in and out of bed feel – adds to that immersive atmosphere.

Leave a Reply

Your email address will not be published. Required fields are marked *