ORK Framework Logo - RPG Editor for Unity
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK

2D RPG Quickstart

30
  • START 2D RPG Quickstart
  • 01 Initial Setup
  • 02 Player Setup
  • 03 Music & Scenes
  • 04 UI System Setup
  • 05 UI Boxes
  • 06 Flying Texts
  • 07 Status Values
  • 08 Status Effects
  • 09 First Abilities
  • 10 Fighter Setup
  • 11 First Enemies & Battle AI
  • 12 Battle System Setup
  • 13 Animating Battle Start and End
  • 14 Random Battles
  • 15 Animating Actions
  • 16 Player Battle HUD
  • 17 Elemental Attacks
  • 18 Animating More Actions
  • 19 Inventory & Loot
  • 20 Equipment
  • 21 Loot, Start Equipment & Viewers
  • 22 Magic Abilities
  • 23 Caster Setup
  • 24 More Enemies
  • 25 Start Menu & Save Games
  • 26 Menu Screens
  • 27 Interactions
  • 28 Item Collectors
  • END 2D RPG Quickstart

3D RPG Quickstart

30
  • START 3D RPG Quickstart
  • 01 Initial Setup
  • 02 Player Setup
  • 03 Music & Scenes
  • 04 UI System Setup
  • 05 UI Boxes
  • 06 Flying Texts
  • 07 Status Values
  • 08 Status Effects
  • 09 First Abilities
  • 10 Fighter Setup
  • 11 First Enemies & Battle AI
  • 12 Battle System Setup
  • 13 Animating Battle Start and End
  • 14 Random Battles
  • 15 Animating Actions
  • 16 Player Battle HUD
  • 17 Elemental Attacks
  • 18 Animating More Actions
  • 19 Inventory & Loot
  • 20 Equipment
  • 21 Loot, Start Equipment & Viewers
  • 22 Magic Abilities
  • 23 Caster Setup
  • 24 More Enemies
  • 25 Start Menu & Save Games
  • 26 Menu Screens
  • 27 Interactions
  • 28 Item Collectors
  • END 3D RPG Quickstart

Status System Setup

24
  • START Status System Setup
  • 01 Status Values
  • 02 Status Development
  • 03 Attack/Defence Modifiers
  • 04 Status Effects
  • 05 Formulas
  • 06 Ability & Item Types
  • 07 Abilities Part 1: Attacks
  • 08 Abilities Part 2: Support & Sabotage
  • 09 Abilities Part 3: Elemental Magic
  • 10 Items
  • 11 Equipment Part 1: Slots & Slot Set Templates
  • 12 Equipment Part 2: Weapons
  • 12.5 (Optional) Equipment Part 2.5: Weapons
  • 13 Equipment Part 3: Shields, Armor & Accessories
  • 13.5 (Optional) Equipment Part 3.5: Shields, Armor & Accessories
  • 14 Equipment Part 4: Available Equipment Templates
  • 15 Loot
  • 16 Battle AIs
  • 17 Combatants Part 1: General Settings
  • 18 Combatants Part 2: Players
  • 19 Combatants Part 3: Enemies
  • 20 Combatant Groups
  • END Status System Setup

3D RPG Playground

53
  • START 3D RPG Playground
  • 01 Player Setup
  • 02 Start Menu
  • 03 First Interaction
  • 04 Music
  • 05 Areas
  • 06 Collecting Items
  • 07 Displaying Equipment
  • 08 Combatant Prefabs, Icons & Portraits
  • 09 Combatant Animations
  • 10 Camera Positions
  • ANIM 01 Battle Start/End Schematics
  • ANIM 02 Use, Cast & Camera
  • ANIM 03 Abilities & Items
  • ANIM 04 Physical Attacks
  • ANIM 05 Special Actions
  • BATTLE 01 Battle Menu
  • BATTLE 02 Prepare for Battle
  • TURN 01 Turn Based Setup
  • TURN 02 Turn Order HUD
  • ATB 01 Active Time Setup
  • ATB 02 Cast Times
  • ATB 03 Timebar HUD
  • BATTLE 03 The First Battle
  • BATTLE 04 Hunting Move AI
  • BATTLE 05 Spawning Combatants
  • 11 Save Games
  • MENU 01 UI Boxes
  • MENU 02 Template HUDs
  • MENU 03 Overview Menu
  • MENU 04 Menu Screens
  • 12 Shop
  • BATTLE 06 Random Battles
  • DUNGEON 01 Enter the Dungeon
  • DUNGEON 02 The Trapdoor
  • DUNGEON 03 Enemies on Level 1 & 2
  • DUNGEON 04 Traps on Level 3
  • DUNGEON 05 Going Deeper
  • 13 Bestiary (+MENU+ANIM)
  • QUEST 01 Hunting Quests (+MENU)
  • QUEST 02 Guard NPC
  • QUEST 03 Forest Ruin Cheese
  • QUEST 04 Witch NPC with Cheese
  • QUEST 05 Quest Mark HUDs
  • 14 Research Trees (+MENU)
  • CRAFT 01 Crafting Materials
  • CRAFT 02 Crafting Recipes
  • CRAFT 03 Crafting Menu
  • CRAFT 04 Crafting Proficiency & Critical Crafting
  • CRAFT 05 Materials Loot
  • 15 Changing Choice Dialogue
  • 16 Follow Me!
  • BATTLE 07 Sequence Loot Dialogue

3D Action RPG

20
  • START 3D Action RPG
  • 01 Status System Setup
  • 02 Player Setup
  • 03 Player Weapon
  • 04 Player Attacks
  • 05 Enemy: Chomper
  • 06 Chomper Attack
  • 07 Hit & Death
  • 08 HUDs
  • 09 Rolling on the Floor
  • 10 Enemy: Spitter
  • 11 Spit Attack
  • 12 Potion
  • 13 Grenade
  • 14 Item HUD
  • 15 Enemy: Grenadier
  • 16 Grenadier Melee Attacks
  • 17 Grenadier Flamethrower
  • 18 Item Drops
  • END 3D Action RPG

2D Grid Battle RPG

17
  • START 2D Grid Battle RPG
  • 01 Player Setup
  • 02 Prefab & Music Setup
  • 03 Randomizing Combatants
  • 04 UI Setup
  • 05 Battle Start, End & Phase Schematics
  • 06 Battle System Setup
  • 07 Battle Grid Setup
  • 08 Grid Move
  • 09 Forest Battle Grid
  • 10 Battle AI
  • 11 Ability Ranges
  • 12 Death & Use Schematics
  • 13 Attack Schematic
  • 14 Shoot Schematics
  • 15 Battle Selection Interaction
  • END 2D Grid Battle RPG

Schematics

10
  • Simple Start Schematic
  • Battle Start Schematic
  • Battle End Schematic
  • Moving to Target and Back
  • Animating a Base Attack
  • Animating a Magic Ability
  • Animating Target Selection
  • Grid Movement
  • Open and Close UI Animations
  • Flying Text Mover

UI Setups

16
  • Unity UI: Initial Setup
  • Unity UI: TextMesh Pro Setup
  • Unity UI: UI Box
  • Unity UI: Flying Text
  • Unity UI: Dragging Notification
  • Unity UI: Canvas with Screen Space Camera
  • Unity UI: Interaction HUD
  • Unity UI: Simple Player HUD
  • Unity UI: Quest HUD
  • Unity UI: Battle Actions HUD
  • Unity UI: Shortcuts HUD
  • Unity UI: Currency HUD
  • Unity UI: Tooltip HUD
  • Unity UI: Control HUD
  • Unity UI: Attack Modifiers
  • Unity UI: Defence Modifiers

Gameplay Bits

13
  • 2.5D Setup
  • Body Part Weakpoint
  • Click Attack
  • Combining Input Origins
  • Combining Status Value Flying Texts
  • Fun With Flying Text
  • HUD Effects With Conditional Schematics
  • Inventory Containers
  • Local Multiplayer
  • Multi Interaction Controllers
  • Target Selection Lines
  • World Space HUD
  • World Space Dialogue
  • Home
  • Guide
  • Tutorials
  • Gameplay Bits
  • 2.5D Setup
View Categories

2.5D Setup

Combine 2D characters with 3D environments to create a 2.5D visual style.

2.5D has become a popular visual style in the last years – games like Octopath Traveler, Triangle Strategy or Live A Live are examples for this visual style. In short, your player/group, enemies or NPCs are 2D sprites in a 3D world.

In this tutorial, we’ll use the assets from the 2D RPG Quickstart tutorials in the 3D RPG Quickstart project to replace a 3D combatant with a 2D combatant. We’ll only cover the setup to keep the movement and rotation correctly facing the camera – the remaining setup (attack animations, etc.) is the same as in the 2D RPG Quickstart tutorials.

Download and Import 2D Tutorial Assets #

You can download the assets from the 2D RPG Quickstart tutorials here:

Download 2D Tutorial Assets Pack

Import the asset pack into your existing 3D RPG Quickstart (or any other 3D project you want to use), but only import the Tutorial Assets folder and it’s content, not the Scenes folder (we don’t need the 2D scenes).

Click in Import – this will take a bit to complete the import for all assets.

2D Prefab Adjustments #

We’ll start our setup with changing the prefab used by our 2D combatants. The 2D RPG Quickstart setup uses a base prefab that handles the setup, with different variants for the combatants (using sprite/animation setup for the combatants).

All we need to do is change this base prefab, CombatantBase, which you can find in Assets/Tutorial Assets/Prefabs/Combatants/. Open the CombatantBase prefab for editing (e.g. via double-click on it).

Currenlty, it looks like this:

It uses 2D collider and rigidbody components – we need to change that and also use a component to keep the sprite facing the camera.

Change to 3D Physics #

With the root CombatantBase game object selected, remove the Box Collider 2D and Rigidbody 2D components in the inspector. You can do this by right/context-click on the component and selecting Remove Component in the context menu.

Add Character Controller #

Add a Character Controller component using the component menu and change the following settings.

  • Center
    Set to X=0, Y=0.5, Z=0.
  • Radius
    Set to 0.5.
  • Height
    Set to 1.

Adjusting Child Objects #

The collider (from the character controller) looks off right now – because we also need to adjust the position of the child objects.

We use this setup to prevent the combatant from spawning halfway in the ground. The root position (local X=0, Y=0, Z=0) should be at the feet of the combatant, as this is the part that’ll be placed at spawn points or battle spots.

Select the CombatantBase > Mount child object and change the Transform component’s position.

  • Position
    Set to X=0, Y=0.5, Z=0.

Select the CombatantBase > Sprite child object and change the Transform component’s position.

  • Position
    Set to X=0, Y=0.5, Z=0.

Facing Camera #

With the CombatantBase > Sprite child object selected, we only need to add a Face Camera (2D, UI) component to it. This component makes sure the game object will keep facing the camera, so our sprite will remain visible.

Use the component menu to add the Face Camera component to the Sprite child object.

And we’re done with adjusting the prefab – the completed prefab now looks like this (when having the root CombatantBase game object selected).

Save the changes and exit editing the prefab.

2D Animation Setup #

Now, it’s time to set up the animations for the 2D combatants. The setup is the same as in the 2D RPG Quickstart tutorials, but with small adjustments to compensate for the 3D rotations.

Open the Makinom editor and navigate to Base/Control > Animations and add a new animation setup.

The 2D combatant prefabs use Mecanim for their animations, so we need to set up Mecanim animations (instead of the legacy animation system used by the 3D RPG Quickstart combatants).

  • Name
    Set to: 2D Mecanim

Mecanim Settings #

We’ll forward the horizontal speed and the rotation (i.e. the direction) to the animator controller. Since we’re in a 3D environment, we need to use the Y-axis rotation instead. We also need some further adjustments to match the 2D directions of the Mecanim animator controller.

  • Set Horizontal Speed
    Enable this setting.
  • Horizontal Parameter
    Set to: Speed
  • Set Y Rotation
    Enable this setting.
    In 2D environments, the directional rotation is the Z-axis (for 3D it’s usually the Y-axis).
  • Rotation Type
    Select Direction 4.
  • Set Float Parameter
    Enable this setting.
  • Paremeter Name
    Set to: Direction
  • In Camera Direction
    Enable this setting.
    The rotation will take the camera direction into account, i.e. rotating the camera around the 2D combatant will adjust it’s direction correctly.
  • Rotation Offset
    Set to -90.
  • Negate Rotation
    Enable this setting.

The Rotation Offset and Negate Rotation settings are needed that way to compensate for the 2D direction setup coming from the 2D tutorial assets. The Y-axis rotation of 3D games and Z-axis rotation of 2D games don’t match, so we need to adjust for it with an offset and rotating in the other direction.

Your own game’s animator controller setup might already be set up correctly to use 3D rotations, so you might need different values or not use them at all.

The rest o the animation setup matches the 2D RPG Quickstart’s animation setup. I’ll skip over it, as the main focus is to get the 2D combatant facing correctly in a 3D world.

Since the 2D animations are set up differently, you’ll also need to use the 2D RPG Quickstart’s schematics for animating battle actions instead of the 3D RPG Quickstart schematics. E.g. attack or use animations are just a sprite change, so they are started and stopped in the schematic instead of just played as it’s done with the 3D RPG Quickstart’s animations.

2D Combatants #

Next, we’ll change the Fighter combatant to use the 2D setup – you can either create a copy of the 3D fighter and adjust the copy, or just change the existing fighter. When using a copy, don’t forget to also update your start game schematic to join the correct fighter to your player group. I’ll update the existing combatant.

Navigate to Combatants > Combatants and select the Fighter combatant.

Base Settings > Prefab Settings #

We’ll change the used prefab – you can find the different 2D combatant prefabs in Assets/Tutorial Assets/NinjaAdventure/Actor/Characters/ in the different sub-folders. I’ll use the BlueSamurai prefab.

  • Prefab
    Select the BlueSamurai prefab (or any 2D combatant prefab you want).

Animations & Movement > Animation System #

We’ll override the default animation system and use Mecanim instead.

  • Own Animation System
    Enable this setting.
  • System Type
    Select Mecanim.

Animations & Movement > Animations #

We’ll replace the default animations and only use the 2D Mecanim animation setup we just created.

  • Replace Default Animations
    Enable this setting.

Click on Add Animations.

  • Animations
    Select 2D Mecanim (the animation setup we created).

Remove the Animation (Battle) 0 setup that’s added (from the 3D RPG Quickstart tutorials).

Save Changes #

And that’s it – click on Save Settings to save the changes.

Testing #

Hit play and test your new 2.5D style.

https://orkframework.com/wp-content/uploads/ork3_tutorial_gameplay_bits__2_5_d_setup__test.mp4

Great – we spawn correctly with the feet on the ground (not stuck in the ground), moving around and rotating the camera keeps the correct rotations of the sprite.

As said above, the remaining 2D animations (attack, use, etc.) still need to be set up and new schematics to animate battle actions need to be created – but all of that is covered by the 2D RPG Quickstart tutorials.

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Table of Contents
  • Download and Import 2D Tutorial Assets
  • 2D Prefab Adjustments
    • Change to 3D Physics
      • Add Character Controller
      • Adjusting Child Objects
    • Facing Camera
  • 2D Animation Setup
    • Mecanim Settings
  • 2D Combatants
    • Base Settings > Prefab Settings
    • Animations & Movement > Animation System
    • Animations & Movement > Animations
    • Save Changes
  • Testing
Sitemap
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (71)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (152)
Search

© 2015 Gaming is Love e.U.

Disclosure: This site may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won’t cost you any money, they will help me fund my development projects while recommending great assets!