Animated Book Menu

Release Notes

Release 1.4.1 (New Version numbering)

Supported Unreal Engine Verisons

Overview

BookMenuActor

BookMenuComponent

BookMenuAnimInstance

BookMenuData

BookMenuStatics



Release 5.3.2 for UE 5.3.2

Book Menu Actor and Book Menu Component

Book Menu Interaction Actor

Book Menu Anim Instance

Page Section Data Struct

Book Menu Statics



Release5.3.1 for UE 5.3.2

Book Menu Actor

Book Menu Component

BookMenuInteractionActor

Book Menu Statics

Assets

Introduction

Introducing the Fully Animated and Ready-to-Use Skeletal Book Mesh Plugin, designed for those who want to elevate their 3D widget experience with an interactive, animated book interface.
This plugin allows you to render UMG User Widgets onto curved, animated book pages, making it perfect for creating immersive and engaging UI elements.

With this plugin, you can easily render custom User Widgets on the book's pages, bringing a dynamic and captivating interface to your project. The UV-based line trace interaction ensures precise input handling.

The book's functionality is fully exposed to blueprints, allowing you to control book animations and implement custom behaviors with ease.
All rendering features as well as the animation logic, are encapsulated within the Animation Instance Class, simplifying the integration and management of the book's visual elements.

The BookMenuData asset type streamlines the creation of multiple books with different covers and contents.
This data-driven approach allows you to quickly define books in the editor, speeding up the development process.

BookMenuPlugin

Main Features of the Plugin

Installation and Setup

If you want to have a detailed description about the following steps, please refer to: Getting Started

Plugin Structure

drawing

C++ Classes

The plugin consists of two modules: a runtime module and an editor module.
The editor module, though currently basic, adds a new asset type called BookMenuActorData to the editor context menu.
This feature allows you to easily define and manage book menu data within the editor.

The runtime module provides the essential base classes for the plugin.
Most users won't need to interact with the C++ code, as the plugin's functionality is designed to be accessible through Blueprints.

Contents

In the content folder, you will find a variety of assets essential for creating interactive book menus:\

Quick Start

Prerequisites

Create a new Project

Open Unreal Engine Launcher and launch Unreal Engine (5.3+)


image.png

Create a new Project


image.png

  1. Select Blank Project
  2. Select Blueprint with Target Platform Windows, Quality Preset Maximum and leave Starter Content and Raytracing unchecked
  3. Name the Project GettingStarted
  4. Click on Create

Project Settings


image.png

NOTE: If being asked to restart, ignore it, we will restart the editor after the next step

Enable Plugin


image.png

NOTE: If being asked to restart the editor, confirm with Restart Now

image.png

Prepare some Content

Folder Setup


image.png

Copy some initial files from the Plugins Content Folder


image.png

image.png

From To
/BookMenu/Blueprints/BookMenuActor_BP /Game/BookMenu/MyBookMenuActor_BP
/BookMenu/BookData/Example_Book_Menu_Data /Game/BookMenu/MyBookData

Basic Player Pawn Setup

Create Player Pawn Blueprnt Class


image.png

Add the Book Menu Component to the Player Pawn


image.png

Configure the Book Menu Component


image.png

image.png

Add some Begin Play Logic


Map Setup

Save the Map and set it as the Editor default map


Because we used the Blank Project Template, the editor will give us the default map at startup, which we have to save first. Click on File > Save All
When being asked where to save the map, choose /BookMenu/Map.umap
Then goto Settings > Projects Settings > Maps & Modes

image.png

Set Editor Startup Map and Game Default Map to the Map we have saved previously.

Place Player Pawn on Map

Drag and Dop the PlayerPawn_BP Blueprint onto the map and adjust its position to something like that:

image.png

Select the recently placed PlayerPawn_BP Actor and navigate to the Details Panel.
Under Auto Poses Player, select Player 0
It is important to also delete the Player Start Object from the Map

image.png

Hit play, you should see something like this:

image.png

Just the Book lying open without any page turn or interaction.
That's what we will add next.

Automatic page turn logic

Adjust the Book Menu Data Config


Open the MyBookData asset (the one we copied earlier from the plugins content folder)
Uncheck Book Begins Play Open and set the Start Page Section to 0
As we remember from the previous play test, the book started in an open state. That was because those options were set.
Save the asset and run the game again by hitting Play.
You should now see that the book starts in an closed state and simply does nothing else.

image.png

Adjustments of the Book Menu Actor


Open the MyBookMenuActor_BP Blueprint (the one we copied earlier from the plugins content folder) OnBeginPlay we want open the Book and set some timers to automatically turn the pages after 5 and back again after 10 seconds.

NOTE: Because Begin Play is also exactly the moment where the whole initialization of the book, the rendering and the Anim instance happens, we should not call any book controls on begin play. But there is a solution by adding a one frame delay

Add the following Blueprint Nodes to Begin Play of MyBookMenuActor_BP

The Delay Until Next Tick must be called before any book control functions on Begin Play. Otherwise the initialization and the control calls collide with each other.
If you hit Play you should see an opening book animation ending like this:

image.png

Now let's add some automatic page turning. Add the following Blueprint Nodes to the output of "Open Book At"

This will open the book. After 5 seconds the book will perform a forward page turn because the new Page Section we are jumping to is greater than the current one.
After 10 seconds the book will perform a reverse Page Turn because the Page Section we are jumping to is smaller than the current one.
Hit play to see the animation sequence we just created.

Adding book interactions

Last but not least, let's make the pages interactive. We want to create an interactive mouse which enables us to hover over the buttons and also to click on the buttons of the pages.

Add Book Menu Interaction Component to the Player Pawn


Open the PlayerPawn_BP Blueprint.
Add a BookMenuInteractionCopmponent to the DefaultSceneRoot of the Actor

image.png

image.png

Select the BookMenuInteraction Component and set the BookMenuInteractionActor_BP as the value under
BookMenu > BookMenuInteractionActorClass

image.png

Extend Begin Play on the Player Pawn


On the Begin Play Node add the "Register Interaction Component" Node after Set Show Mouse Cursor:

This registers the newly added BookMenuInteraction Component inside the Book Menu Actor

Create regular mouse traces

In order to interact with the pages of the book we want to create traces starting starting from the mouse cursor on the screen into the game world.
For this purpose the Book Menu Statics Library offers a node called Create Mouse Trace Parameters.
Those parameters can be used to try an interaction on the Book Menu Actor.
Add the following nodes to the Event Tick of the PlayerPawn_BP:

This creates the mouse trace parameters with an trace distance of 500 units and passes the start and end locations for the actual trace into the interact method of the Book Menu Actor
If you enable Debug Trace you will later see how the traces are performed by drawn lines inside the viewport.
Apropos viewport, let's switch to the viewport of the book menu actor and position the book menu interaction component in a way so that we can see what it is actually doing.
In the viewport move the BookMenuInteraction Component to the position X:120 Y:0 and Z:60
This will place the BookMenuInteraction Component so that we can see it in game.
Like this in the background:

image.png

NOTE: Usually you don't want to have the Book Menu Interaction Component on screen. Therefore it makes sense to move it behind the camera and for multiplyaer games not to replicate the component at all.

Lets move the Book Menu Interaction Component behind the Camera to position X: -120 Y:0 Z:0
Hit play and hover the Buttons. You should see them lighting up. But you can't click them yet. Thats what we are doing next.

Adding Input to the Book Menu Interaction Actor


Somewhere inside the event graph of PlayerPawn_BP add the following nodes:

This gets the Widget Interaction Component from the Book Menu Interaction Component. We can use this Widget Interaction Component like any normal Widget Interaction Component (see: Unreal Engine Documentation ) Which means we can do a lot of stuff with it. In our example we implement a pointer key press and release.
Hit play and you will be able to hoer and click the buttons.
That's the getting started Have fun and have a look onto my Youtube Channel for more tutorial, which will be added from time to time!

Book Menu Data

Book Menu Data

Book Menu Editor - Book Menu Data

Book Menu Data Assets can be easily created within the Content Browser.
Rightclick on any free space within the content browser and select 

Book Menu -> Book Menu Dta

image.png

image.png

 

Currently the Book Menu Data Editor is a very simple properties editor. You can adjust any value here:

image.png

 

Book Menu Data

Set Book Menu Data and Page Sections (Design Time and Run Time)

Set Book Menu Data at design time

The Book Menu Data normally should be set at design time. At least a possible default value.
It can be set either on the Book Menu Component or the Book Menu Actor directly

Book Menu Component

Option 1:

Set the Book Menu Data on the Class Default value inside any actor that instantiates the Book Menu Component

image.png

Option 2:

Another way is to set the Book Menu Data on an actor that instantiates the Book Menu Component inside the 3D Viewport.

image.png


Book Menu Actor

Option 1:

Set the Book Menu Data on the Class Default value inside the Book Menu Actor. 

This only works if the Book Menu Actor gets used directly e.g. by Placing it in the World.
If the Book Menu Actor gets instantiated via a Book Menu Component, always the Book Menu Component Value overwrites the default value of the Book Menu Actor

image.png

Option 2:

Another way is to set the Book Menu Data on an Book Menu Actor that was directly placed in the World inside the 3D Viewport.

image.png

Set Book Menu Data at run time

The Book Menu Data can also be set after Begin play at run time.
It can be set either on the Book Menu Component or the Book Menu Actor directly

Book Menu Component

Let's assume the Book Menu Component is instantiated on an Actor called PlayerPawn.
Inside the PlayerPawn Blueprint on the Begin Play function, we want to set the Book Menu Data at run time.

To do this we can simply call the function "SetBookMenuData" on the Book Menu Component.

image.png

At Begin Play this will set the Book Menu Data and initialize all necessary parts of the Book Menu Component. 

Book Menu Actor

the same function can also be called directly on the Book Menu Actor. Again, let's assume the Book Menu Component is instantiated on an Actor called PlayerPawn.
Inside the PlayerPawn Blueprint on the Begin Play function, we want to set the Book Menu Data at run time.

But this time we get the Book Menu Actor first from the Book Menu Component and call  the function "SetBookMenuData" on the Book Menu Acor directly instead.

The example might look a bit silly but actually this shows us that the functions can be called on the Book Menu Actor as stand alone. In case we don't have a Book Menu Component (e.g. because the Book Menu Actor was placed directly in the World)

image.png


Add Page Sections to the Book Menu Data at run time

Usually the Book Menu Data Assets get created at design time, which means inside the content browser before running the game.
Sometimes you may want to add some page sections dynamically at runtime.

Because the Book Menu Data Assets instances created in the Content Browser might be used by many different Book Menu Actors (or Book Menu Components), it might not be a good idea to manipulate the
Book Menu Data instances directly. Because this change would affect any Book Menu Actor that has a reference to the Book Menu Data Asset.

The Bok Menu Plugin cares about this problem by cloning the Book Menu Data Asset first before using it internally. Additionally the Plugin provides a function to create runtime instances of the Book Menu Data Assets to work with at runtme
without manipulating the default instances.

Let's assume the Book Menu Component is instantiated on an Actor called PlayerPawn.
Inside the PlayerPawn Blueprint on the Begin Play function, we want to

Here you can see the Blueprint for this:

Controlling the pages of the book

Overview

Controlling the behavior of the book is straight forward and easy. You can use the exposed blueprint functions o perform the different actions on the BookMenuActor class:

How to call the functions?

The above mentioned functions are implemented in the BookMenuActor class. To call those functions, you can either invoke them on the BookMenuActor directly or calling them from anywhere by using a reference of the respective BookMenuActor

On the BookMenuActor directly


Inside a Blueprint which is derived from BookMenuActor, you can directly call the book control functions:

On the BookMenuComponent


If you have a reference to the BookMenuComponent you can call the book menu control functions via a reference on the BookMenuActor:

Book Control Functions

Open Book At

Parameter Description
Section Index The Page Section Index to be displayed while opening the book

Use this function to open the book on a specific page section index. By default this is 0 which means that the book will open on the first pair of pages.\

Hint - If the book is already in an opned state, call ing this function will implicitly call the Jump to Page Section function instead

To find out if the book is opened or closed you can us the following function:

The function will return true if the book is already fully open.
The function will return false if the book is closed or the open animation is still in progress.

To find out if the book should be opening at the moment, you can call the following function:

The function will return true if the book should be in an open state but is not yet fully open.
The function will return false if the book is fully open.

Close Book

This function will close the book.

To find out if the book should be in a closed sate, you can call this function:

The function will return true if the book should be in an closed state but is not yet fully closed.
The function will return false if the book is fully closed.

Jump to Page Section

Parameter Description
Section Index The Page Section Index to be navigated to

Using this function you can navigate through the page sections of the book. Depending on the Current Page Section Index the function will either perform a page turn animation forward or backwards.

Examples: - If the Section Index parameter is greater than the Current Page Section Index a page turn forward will be performed
if the Section Index parameter is smaller than the Current Page Section Index a page turn backward will be performed

To get the current active page section index you can call the following function:

This will return the index of current active page section index

Note: - Do not confuse the page scetion index with the page index. The page index indicates the left 0 or right 1 page of a page section

Additional Resources

Additional Resources

Example Project

You can download the Example Projects here:  AnimatedBookMenu_ExampleProjects.zip

Additional Resources

More Turorials

Please have a look onto my Youtube Channel for more tutorials, which will be added from time to time!

Blueprint Interface Documentation

Blueprint Interface Documentation

ABookMenuActor

Properties

Property Name Type Access Description
BookMenuData UBookMenuData EditAnywhere Default Configuration Data for the Book, containing information such as the the widgets to be displayed as book pages
SkeletalMeshComponent USkeletalMeshComponent VisibleAnywhere, BlueprintReadOnly The animated book mesh
StaticMeshComponent UStaticMeshComponent VisibleAnywhere, BlueprintReadOnly A dummy static mesh component for doing traces. Needed to determine the UV coordinates based on trace hit results. The static mesh will be hidden in game. Must represent the book in a open state.
LeftPageCollision UBoxComponent VisibleAnywhere, BlueprintReadOnly Collision box used to determine which page of the book was traced 
RightPageCollision UBoxComponent VisibleAnywhere, BlueprintReadOnly Collision box used to determine which page of the book was traced 
InteractionActor ABookMenuInteractionActor EditAnywhere, BlueprintReadOnly Reference to the actor that redirects the interaction to a widget interaction component

Functions

Set Book Menu Data


Can be used to set the book menu data after begin play, during the game

Pin Direction Type Description
In Book Menu Data Input UBookMenuData The new Book Menu Data. Will be cloned internally.


Get Book Menu Data


Can be used to set the book menu data after begin play, during the game

Pin Direction Type Description
Return Value Output UBookMenuData A clone of the current Book Menu Data


Get Current Page Section Index


Can be used to get the current page section index. The page section index indicates the currently shown pair of pages. (Index of the PageSection Array inside the BookMenuData)

Pin Direction Type Description
Return Value Output Integer the current page section index; -1 in case Anim Instance is not defined


Get Pending Page Section Index


Can be used to get the pending page section index. The pending page section index indicates the currently pending pair of pages while switching pages is in progress.

Pin Direction Type Description
Return Value Output Integer the pending page section index; -1 in case Anim Instance is not defined


Get Current Page Index


Can be used to get the index of the current page, where the interaction pointer points on.

Pin Direction Type Description
Return Value Output Integer the current page index 0 = Left ; 1 = Right
returns -1 in case Anim Instance is not defined


Get Book Is Open


Can be used to check if the book is in an opened state

Pin Direction Type Description
Return Value Output Boolean true if the book is in open state; false if the book is in closed state


Get Book Should Open


Can be used to check if the book should be in an opened state but opening is still in progress.

Pin Direction Type Description
Return Value Output Boolean true if the book should be in open state


Get Book Should Close


Can be used to check of the book should be in a closed state but closing is still in progress.

Pin Direction Type Description
Return Value Output Boolean true if the book should be in closed state


Get Page Sections


Can be used to get the Page Sections.

Pin Direction Type Description
Return Value Output TMap<int32,FPageSectionDataStruct> an Map of the page sections of the book


Get Interaction Actor


Returns the reference to the Book Menu Interaction Actor

Pin Direction Type Description
Return Value Output ABookMenuInteractionActor Returns the reference to the Book Menu Interaction Actor


Set Interaction Actor


Registers the Book Menu Interaction Actor to be used for Interaction with the Book

Pin Direction Type Description
In Interaction Actor Input ABookMenuInteractionActor The Book Menu Interaction Actor to be set


Register Interaction Component


Method to register a Book Menu Interaction Component

Pin Direction Type Description
In Interaction Component Input UBookMenuInteractionComponent The Book Menu Interaction Component to be registered. 


Register Interaction Actor


Method to register a Book Menu Interaction Component

Pin Direction Type Description
In Interaction Actor Input UBookMenuInteractionActor The Book Menu Interaction Actor to be registered. 


Jump to Page Section


Determines if a forward or backward page turn need to be performed based on the current page section index.

Pin Direction Type Description
Section Index Input int32 The index of the Page Section to be displayed


Open Book At


If the book is closed, this triggers the open book animation and upfront sets the correct section to display.

Pin Direction Type Description
Section Index Input int32

The Page Section Index to be displayed while opening the book


Close Book


Triggers the Close Book animation


Pause Book Update


Pauses the animation update of the anim instance without closing the book first.


Resume Book Update


Resume the animation update of the anim instance. Will only resume if the book is already open. Closed books don't need to consume render time


Interact


Performs a Line Trace based on the Start and End Parameters and moves the Widget Interaction pointer of the Book Menu Interaction Actor if it is set. Also tells the Animation Blueprint which page was traced to.

Pin Direction Type Description
Start Input FVector

Start of the Line Trace

End Input FVector

End of the Line Trace

Debug Trace Input bool

Shows a debug trace if true.

Trace Channel Input ECollisionChannel

The Collision Channel to be used for the line trace.

Success Output EXEC

Indicates if the Interaction was executed successfully

Failed Output EXEC

Indicates if the Interaction was not executed successfully

Return Value Output bool

returns tru if the operation was successful. Otherwise false


InteractExt (Release 1.4+)


Performs a Line Trace based on the Start and End Parameters and moves the Widget Interaction pointer of the Book Menu Interaction Actor if it is set. Also tells the Animation Blueprint which page was traced to.

Pin Direction Type Description
Start Input FVector

Start of the Line Trace

End Input FVector

End of the Line Trace

OutUVCoordinates Output FVectro2d

The UV coordinates of the traced page

Debug Trace Input bool

Shows a debug trace if true.

Trace Channel Input ECollisionChannel

The Collision Channel to be used for the line trace.

Success Output EXEC

Indicates if the Interaction was executed successfully

Failed Output EXEC

Indicates if the Interaction was not executed successfully

Return Value Output bool

returns tru if the operation was successful. Otherwise false


Set Keyboard Focus



Pin Direction Type Description
In Page Index Input Integer

The page index to set the focus to

Debug Trace Input bool

Shows a debug trace if true.

Success Output EXEC

Indicates if the Interaction was executed successfully

Failed Output EXEC

Indicates if the Interaction was not executed successfully

Return Value Output bool

returns tru if the operation was successful. Otherwise false


Get Anim Instance


Returns the Animation Instance of the Animation Blueprint

Pin Direction Type Description
Return Value Output UBookMenuAnimInstance



Get Left Page Collision Box


Returns the Collision Box of the left page

Pin Direction Type Description
Return Value Output UBoxComponent


Get Right Page Collision Box


Returns the Collision Box of the right page

Pin Direction Type Description
Return Value Output UBoxComponent


Get Static Mesh Component


Returns the Static Mesh Component

Pin Direction Type Description
Return Value Output UStaticMeshComponent


Blueprint Interface Documentation

ABookMenuInteractionActor

Properties

Property Name Type Access Description
WidgetInteractionComponent UWidgetInteractionComponent VisibleAnywhere, BlueprintReadOnly The widget interaction component used to redirect the book interaction onto a Widget Component
PageWidgetComponentA UWidgetComponent VisibleAnywhere, BlueprintReadOnly The widget component used to display the first page
PageWidgetComponentB UWidgetComponent VisibleAnywhere, BlueprintReadOnly The widget component used to display the second page
PageWidgetComponentC UWidgetComponent VisibleAnywhere, BlueprintReadOnly The widget component used to display the third page
PageWidgetComponentD UWidgetComponent VisibleAnywhere, BlueprintReadOnly The widget component used to display the fourth page
ActiveWidgetComponent UWidgetComponent VisibleAnywhere, BlueprintReadOnly The widget component which is currently under interaction
DrawSize UStaticMeshComponent VisibleAnywhere, BlueprintReadOnly The Draw Size of the Widget. User Widgets and Render Targets must have the same resolution. Will be set via the Book Menu Data of the Book Menu Actor

Functions

Move Pointer


Calculates the world location on the Page Widget based on the UV Coordinates of the Book Actors Book Mesh

Pin Direction Type Description
UV Coordinates Input FVector2D  UV Coordinates of the Book Page
Debug Trace Input bool Shows a debug trace if true
Return Value Output bool returns true if the operation was successful. Otherwise false.

Reset Pointer


Sets the Interaction Pointer to a safe spot which triggers no interaction

Pin Direction Type Description
Debug Trace Input bool Shows a debug trace if true
Return Value Output bool returns true if the operation was successful. Otherwise false.

Get Interaction Component


returns the Widget Interaction Component. Can be used to do further interaction with the widget such as send keys etc.

Pin Direction Type Description
Return Value Output UWidgetInteractionComponent

 

Blueprint Interface Documentation

UBookMenuData

Properties

Property Name Type Access Description
SkeletalMesh USkeletalMesh EditAnywhere The Skeletal Mesh to be set after Begin Play
AnimInstanceClass TSubclassOf<UBookMenuAnimInstance> EditAnywhere The Animation Blueprint class to be set after Begin Play
PageMaterialIndexMapping FPageMaterialIndexMapping EditAnywhere Mapping that tells us which Material Index of the Skeletal Mesh shall be used for which Page
DefaultPageSection FPageSectionDataStruct EditAnywhere, BlueprintReadWrite The Default Page Section to be used if no concrete Page Section is defined
PageSections TArray<FPageSectionDataStruct> EditAnywhere, BlueprintReadWrite List of Page Sections to be used inside the Book Menu Actor
CoverMaterial UMaterialInterface EditAnywhere, BlueprintReadWrite Material for the Cover
bBookBeginsPlayOpen bool EditAnywhere, BlueprintReadWrite If the book shall begin play in an open state or closed state
StartPageSection int32 EditAnywhere, BlueprintReadWrite If the book shall begin play in an open state, this is the page section to open the book at. Can also be accessed by the Book Menu Actor to handle respective behavior.
DrawSize FVector2D EditDefaultsOnly Draw Size of the Render Targets and the Widgets. Used to set the Draw Size on all involved Actors and components
RedrawTime (Release 1.4+) float EditDefaultsOnly Time between redraws. if 0 we would redraw every frame

Functions

No functions

Blueprint Interface Documentation

UBookMenuAnimInstance

Properties

Property Name Type Access Description
BookMenuActor ABookMenuActor BlueprintReadOnly The Owning Book Menu Actor 
PageSections TMap<int32,FPageSectionDataStruct> BlueprintReadOnly List of all available Page Sections of the current book
PageTextureA UTextureRenderTarget2D BlueprintReadWrite Texture Render Target of the page one. Left side.
PageTextureB UTextureRenderTarget2D BlueprintReadWrite Texture Render Target of the page two. Right side.
PageTextureC UTextureRenderTarget2D BlueprintReadWrite Texture Render Target of the page three. Backside of page two.
PageTextureD UTextureRenderTarget2D BlueprintReadWrite Texture Render Target of the page four. Backside of page one.
MaterialPageA UMaterialInstanceDynamic BlueprintReadWrite Dynamic Material Instance of page one. Must have a Texture Parameter called BC
MaterialPageB UMaterialInstanceDynamic BlueprintReadWrite Dynamic Material Instance of page two. Must have a Texture Parameter called BC
MaterialPageC UMaterialInstanceDynamic BlueprintReadWrite Dynamic Material Instance of page three. Must have a Texture Parameter called BC
MaterialPageD UMaterialInstanceDynamic BlueprintReadWrite Dynamic Material Instance of page four. Must have a Texture Parameter called BC
MaterialCover UMaterialInstanceDynamic BlueprintReadWrite Dynamic Material Instance of The Cover.
PageSectionAIndex int32 BlueprintReadOnly Page Section Index for Pages one and two
PageSectionBIndex int32 BlueprintReadOnly Page Section Index for Pages three and four
DefaultPageSection FPageSectionDataStruct BlueprintReadOnly The Default Page Section in case there is no defined page section.
CurrentPageSectionIndex int32 BlueprintReadOnly The Current Page Section Index to be displayed on page one and two
CurrentPageIndex int32 BlueprintReadOnly The current Page the Interaction point on. Can be either the Left or the Right Page.
PendingPageSectionIndex int32 BlueprintReadOnly The Page Section Index that is pending while switching pages. 
DrawSize FVector2D BlueprintReadOnly The Draw Size of the render targets. Must match the Widget Component Draw Size of the Book Interaction Actor.
bBookIsOpen bool EditAnywhere, BlueprintReadOnly Indicates if the book is or shall be in an opened state
bBookShouldOpen bool BlueprintReadWrite Indicates if the book should open
bBookShouldClose bool BlueprintReadWrite Indicates if the book should close
bBookShouldSetKeyboardFocus bool BlueprintReadOnly Indicates if KeyboardFocus is pending

Functions

Set Page Sections


Sets or replaces the current list of Page sections

Pin Direction Type Description
InPageSections Input TArray<FPageSectionDataStruct> List of Page Sections to be set.


Init


Method to Initialize the Animation Instance and set configurations such as Book Data.

Pin Direction Type Description
InData Input UBookMenuData The Book Menu Data
InBookMenuActor Inout ABookMenuActor The Book Menu Actor


Jump to Page Section


Determines if a forward or backward page turn need to be performed based on the current page section index.

Pin Direction Type Description
SectionIndex Input int32 the index of the Page Section to be displayed


Open Book At


If the book is closed, this triggers the open book animation and upfront sets the correct section to display.

Pin Direction Type Description
SectionIndex Input int32 The Page Section Index to be displayed while opening the book


Close Book


Triggers the Close Book animation


Play Page Turn Forward Anim


34yv0-ma Method to be overwritten in the Anim Blueprint. Shall start the Page Turn forward animation.


Play Page Turn Reverse Anim


Method to be overwritten in the Anim Blueprint. Shall start the Page Turn backward animation.


Play Open Book Anim


5kdaq6c5 Method to be overwritten in the Anim Blueprint. Shall start the Open Book animation.


Play Close Book Anim


Method to be overwritten in the Anim Blueprint. Shall start the Close Book animation.


Play Idle Book Anim


Method to be overwritten in the Anim Blueprint. Shall start the Idle animation.


On Page Turn Anim End


If the book is closed, this triggers the open book animation and upfront sets the correct section to display.

Pin Direction Type Description
IsTurnForward Input bool Indicates if a page forward (true) or a page backward (false) animation was executed.


On Book Open Anim End


Method to be called at the end of the Open Book Animation. You want to use Anim Notifies to find out when to call this Method.


On Book Close Anim End


Method to be called at the end of the Close Book Animation. You want to use Anim Notifies to find out when to call this Method.


On Book Idle Anim End


Method to be called at the end of the Idle Book Animation. e.g. to restart the Idle animation. You want to use Anim Notifies to find out when to call this Method.


On Paused


Called when the Anim Blueprint gets Paused to do some "pausing" stuff in the Blueprint


On Resumed


Called when the Anim Blueprint gets Resumed to do some "resuming" stuff in the Blueprint

Blueprint Interface Documentation

UBookMenuComponent

Properties

Property Name Type Access Description
BookMenuActor ABookMenuActor VisibleAnywhere, BlueprintReadOnly The spawned Book Menu Actor
BookMenuData UBookMenuData VisibleAnywhere, BlueprintReadOnly The Book Menu Data to initialize the spawned Book Menu Actor
BookMenuActorClass TSubclassOf<ABookMenuActor> VisibleAnywhere, BlueprintReadOnly The Class of the Book Menu Actor to be spawned at Begin Play

Functions

Register Interaction Component


Calculates the world location on the Page Widget based on the UV Coordinates of the Book Actors Book Mesh

Pin Direction Type Description
In Interaction Component Input


Register Interaction Actor


Calculates the world location on the Page Widget based on the UV Coordinates of the Book Actors Book Mesh

Pin Direction Type Description
In Interaction Actor Input


Interact


Performs a Line Trace based on the Start and End Parameters and moves the Widget Interaction pointer of the Book Menu Interaction Actor if it is set. Also tells the Animation Blueprint which page was traced to.

Pin Direction Type Description
Start Input FVector

Start of the Line Trace

End Input FVector

End of the Line Trace

Debug Trace Input bool

Shows a debug trace if true.

Trace Channel Input ECollisionChannel

The Collision Channel to be used for the line trace.

Success Output EXEC

Indicates if the Interaction was executed successfully

Failed Output EXEC

Indicates if the Interaction was not executed successfully

Return Value Output bool

returns true if the operation was successful. Otherwise false

Interact Ext


Performs a Line Trace based on the Start and End Parameters and moves the Widget Interaction pointer of the Book Menu Interaction Actor if it is set. Also tells the Animation Blueprint which page was traced to.

Pin Direction Type Description
Start Input FVector

Start of the Line Trace

End Input FVector

End of the Line Trace

Out UV Coordinates Output FVector2d

The UV Coordinate of the trace page

Debug Trace Input bool

Shows a debug trace if true.

Trace Channel Input ECollisionChannel

The Collision Channel to be used for the line trace.

Success Output EXEC

Indicates if the Interaction was executed successfully

Failed Output EXEC

Indicates if the Interaction was not executed successfully

Return Value Output bool

returns true if the operation was successful. Otherwise false

Blueprint Interface Documentation

UBookMenuInteractionComponent

Properties

Property Name Type Access Description
BookMenuInteractionActorClass TSubclassOf<ABookMenuInteractionActor> EditAnywhere The Class of the Book Menu Interaction Actor to be spawned at Begin Play
InteractionActor ABookMenuInteractionActor BlueprintReadOnly The spawned Book Menu Interaction Actor

Functions

Get Widget Interaction Component


returns the Widget Interaction Component

Pin Direction Type Description
Return Value Output UWidgetInteractionComponent

 

Blueprint Interface Documentation

UBookMenuStatics

Properties

The static Blueprint Function Library does not define any properties.

Functions

Create Mouse Trace Parameters


Description

Method to translate the mouse position into trace parameters such as start and end

Pin Direction Type Description
Player Controller Input APlayerController The Player controller
Trace Distance Input float The distance (length) used to perform the trace
Success Output EXEC Indicates if the operation was successful
Failed Output EXEC Indicates if the operation was failed
Out Start Output FVector The resulting Start Coordinate of the Trace Parameters
Out End Output FVector he resulting End Coordinate of the Trace Parameters

Move Widget Interaction Pointer


Description

Calculates the world location on the Page Widget based on the UV Coordinates of the Book Actors Book Mesh

Pin Direction Type Description
In Widget Interaction Component Input UWidgetInteractionComponent The Widget Interaction Component that shall be influenced
In Widget Component Input UWidgetComponent The Widget Component the Pointer shall be moved on
In Reference Rotation Input FRotator A reference rotation in order to do some relative calculations. e.g. the World Rotation of the Book Interaction Actor.
UV Coordinates Input FVector2D UV Coordinates to be translated onto the Widget
Debug Trace Input bool shows a debug trace if true.
Return Value Output bool returns true if the operation was successful. Otherwise false.

Book Uv Trace


Description

Creates a trace based on the given collision channel. If a Book Men uActor was hit the Method determines if the book was hit from the front and tries to determine the current page and the UV Coordinates. This requires the Project Settings to be set to use the generation of UV coordinates from hit results.

Pin Direction Type Description
Book Menu Actor Input ABookMenuActor The Book Menu Actor we ar looking for
Start Input FVector Start of the Trace
End Input FVector End of the Trace
Debug Trace Input bool shows a debug trace if true
Trace Channel Input ECollisionChannel The Collision Channel to be used for the Trace
Out UV Coordinates Output FVector2D The found UV Coordinates
Out Page Index Output int32 The found page index 0 = Left ; 1 = Right
Return Value Output bool returns true if the operation was successful. Otherwise false.

Get Local Player Controller


Description:

Method to get the First local Player Controller based on the World Context


Create Texture Render Target 2D


Description

Creates a new Render Target with the specified parameters

Parameter Direction Type Description
Draw Size Input FVector2D The DrawSize of the Render Target
Filter Input TextureFilter The Texture Filter to be applied
Use Gamma Correction Input bool Uses Gamma Correction if true
Return Value Output UTextureRenderTarget2D returns the created Render Target


Draw UserWidget to Render Target 2D


Description

Method to render a UserWidget onto a TextureRenderTarget2D

Parameter Direction Type Description
User Widget Input UUserWidget The UserWidget to be rendered
Render Target Input UTextureRenderTarget2D The Target to be rendered on
Draw Size Input FVector2D The DrawSize of the Render Target
Delta Time Input float Delta time
Use Gamma Correction Input bool Uses Gamma Correction if true
Blueprint Interface Documentation

UBookPageWidget

Properties

Property Name Type Access Description
BookMenuActor ABookMenuActor EditAnywhere The Owning Book Menu Actor of the widget. Can be used to control the Book Menu actor from the widget 
PageSectionIndex int32 VisibleAnywhere, BlueprintReadOnly The page section index of this widget. Can be used for navigation.
PageIndex int32 VisibleAnywhere, BlueprintReadOnly The page index. 0 = Left page, 1 = Right page

Functions

Init


Method to initialize the most important data in the Widget

Pin Direction Type Description
InBookMenuActor Input ABookMenuActor The Owning Book Menu Actor of the widget. Can be used to control the Book Menu actor from the widget 
InPageSectionIndex Input int32 The page section index of this widget. Can be used for navigation.
InPageIndex Input int32 The page index. 0 = Left page, 1 = Right page

 

OnSetKeyboardFocus


Use this event to handle custom code after the widget received keyboard focus. This function is the counter part the SetKeyBoardFocus Function of the BookMenuActor.