Monthly Archives: December 2018

Placing and Moving Objects in Unreal

A game world with nothing in it would be pretty boring. Just a flat empty expanse. Today we are going to go over various ways to put objects into the game world and how to move them around.

Placement

By default you are in Place mode in the editor when you start it, but if you aren’t you can easily switch to it by selecting it from the tabs in the Modes window on the left side of the editor, it is the first tab with the cube and light bulb in it. You can also switch to this mode by pressing Shift + 1.

In the Modes window you should see various categories of things you can place in your game world including Basics like simple geometric shapes and actor representations, Lights, as well as any classes you have created (under All Classes).

Clicking and dragging one of these objects into your main view will add it to the world.

You can also just right click in the main view and choose from the various place options in the context menu.

Additionally you can use the Content Browser that is by default open at the bottom of the window to drag Static Meshes and Actors into the world.

Movement

Basic Movement

When you click on an object in the main view, if you are using the default tool (Select and Translate Objects) you will see a small white sphere appear with 3 arrows or vectors coming out from it. Clicking one of these arrows allows you to move the object along that Axis (X, Y, or Z). Pretty simple and intuitive. If for some reason you see something different, make sure you are using the correct tool by hitting the W key.

If you click the right angle line between any 2 of the arrows you can move the object along those 2 Axis at the same time. And if you click the small white sphere you can move the object along all 3 at the same time.

Rotated Movement

The Axis by default are in relation to the World. But if you have rotated your object and want to move it in a straight line in relation to it rotation, you can change the context of the movement tool by clicking the small icon at the top of the main view that looks like a globe (or a cube if you are in local object coordinate mode). There is also a handy keyboard shortcut for doing toggling back and forth, Ctrl + ` (backtick, same key as ~, right next to the number 1 on most keyboards).

Moving With Or Without the Grid

There is a grid system for helping line up objects and move them in precise increments. You can change the size of the increments that you want or turn the snapping system off entirely. The selectors for this are in the group of selectors on the top right of the main view, right next to the coordinate mode toggle selector.

Moving the Camera with the Object

Sometimes you need to move the object off screen or just a far distance that might have you move it, move the camera, then move it again. Instead you can hold down the Shift key and the camera will move along with the object as you drag the control that you want.

For lights and camera objects, you can actually lock the viewport camera on to them and use the normal view/camera controls (mouse and WASD) to position them precisely or at least in a way that makes sense visually. To do this, select the light or camera you want to control, right click on it and select “Pilot this object” although it will have the name of the object there. To stop piloting, there will be a control in the top left of the viewport that lools like an up arrow with a line under it. Simply click that to go back to the normal viewport camera.

Details Panel Movement

If you want super precise placement, you can also move objects by putting in the exact coordinate number location that you want in the objects properties in the Details window on the right side of the screen. This is in the Transform section with the appropriate Location label.

Final note, the End key will drop your object to the floor. This is super useful to avoid floating objects.

Rotation

Basic Rotation

Rotation is very similar to movement as far as controls go.

You can switch to the Rotate Object tool from the top of the main view or by pressing E. When you do, you will see 3 half circles. Each of these circles allows you to rotate the object along any 1 Axis.

And same as movement, you can switch the relationship of the rotation from rotating relative to the world to rotating relative to the selected object. Same on screen toggle and same hotkey, Ctrl + `.

Rotation Snapping and Details Panel

Similar to the grid for movement, you can have the rotation snap along various degree increments. And for super precise rotation, you can type the exact angles you want in the Details window on the right side of the screen.

I recommend starting a little throwaway project with Unreal’s Starter Content and practicing the various placement and rotation tools.

Keep getting wiser, stronger, and better.

Changing Your Perspective, in Unreal

Today I learned how to easily access the different orthographic views of the game world from the Unreal Editor. You might remember orthogonal lines from math in college or highschool, meaning lines that go off at 90 degree angles.

Orthographic is similar. It means representing a 3D space in 2D so we are looking at the world from directly along one of the 3 axis (X, Y, or Z) and seeing the equivalent of a builder’s blueprint. These views will be useful for precise placement of objects and laying out the game world the way you want.

Find the Right Angle

There are 3 basic ways to switch between views. In the top right of the main viewport, to the right of the camera speed indicator/changer, is a tiny square for maximizing or minimizing the view. This will take you from the default view of Perspective mode to the unified view where you can see all 4 (Perspective, Top Down, Side, and Front) together. In each of the smaller windows you can choose to maximize them and have them take up the entire screen.

There is also a selector to the top left of the main viewport that will let you switch between them directly without having to go to the unified view. In this selector, you can see the 3rd method of switching which is keyboard shortcuts. The defaults are: Alt + G for the Perspective mode, Alt + J for Top Down, Alt + K for the Side View, and Alt + H for the Front. If you press Shift + any of the Alt combinations, it takes you to the other side of the 2D perspective such as the Back instead of the Front.

You can move around these views by holding down the right mouse button and dragging. The left mouse button is used for selection.

See Things Differently

In addition to changing where you see things from, you can also change how you see things and whether or not you see things. Just to the right of the perspective selector are 2 other drop downs that have a ton of view changing options in them.

First there is the View Mode selector that lets you choose various kinds of lighting views, a wireframe mode that shows all of the edges of your objects, and a variety of other views.

Next to that is the Show Flags selector where you can toggle different elements of the game world and editor on and off from the view. In a busy environment it might be difficult to see just what you are looking for. This gives you the ability to declutter without actually removing anything.

Just in case you toggle some things off and can’t remember how to get back to the default view, there is a nice handy selection at the top to reset all of the defaults.

Looking forward to putting all of these different view navigation features to work making games.

Keep getting wiser, stronger, and better.

An Unreal Journey

I have been messing around a bit with the Unreal Engine editor, and today I decided that I wanted to begin the journey of mastering making games with it.

I have figured out how to do a few things here and there just messing around and with some quick searches but it really felt a little overwhelming. It is a huge engine with tons of features and multiple built in editors. The only way to really approach something this big is one small piece at a time.

Speaking of breaking down overwhelming looking tasks, I can wholeheartedly recommend How to Fight a Hydra by Josh Kauffman. It is an awesome little book that is literally a story of a man fighting a hydra. At the same time it is a set of principles for approaching large, difficult projects. Not expensive, but filled with value.

Where Do You Start?

If you don’t have a lot of knowledge about a subject, you can’t even ask the right questions. Whenever you are attempting to learn anything, it is best to figure out as many of your unknown unknowns as you can and turn them into known unknowns.

In order to figure out what you don’t know, you will need a large amount of skimmed info on the subject to find out the broad areas you will need to cover. Reading the chapter breakdown at the beginning of a book or even skimming over a few tutorials will help out here.

So far I have come across this excellent list:

  • Create and Manage Projects
  • Viewport Navigation
  • How to use the Content Browser
  • Placing and working with objects and static meshes
  • How to use BSP to block-in a level layout
  • How to use static meshes to construct environments
  • How to insert and use lights (directional, spotlight, etc)
  • How to manage a scene
  • How to insert required level objects (lightness importance volume, player start, etc)
  • How to build objects to scale and proportion
  • How to render the game or build all
  • How to playtest from the editor
  • Little shortcuts to do all of the other steps faster

And this is just stuff a beginner needs to learn. Not to mention Blueprints and / or the C++ code to make the game run.

Step One

As you will find in fighting hydras, you take everything one task at a time. So today I went back over how to navigate the viewport, following Unreal’s tutorials on their YouTube channel.

There are actually a couple of different ways to move the camera around based on your particular taste. My personal choice is using WASD to move like a video game character. This only moves the camera while holding down the right mouse button. E and Q raise and lower the camera and moving the mouse around lets you turn.

You can also hold down the left mouse button and drive the camera around with the mouse.

Alternatively, they have a Maya mode for people used to working in the Maya 3D editor where you hold down Alt and left mouse which allows the mouse to “tumble” the camera around the selected point. Selecting an object and hitting F (while holding Alt) will frame or center the view of the camera on the selected object.

I recommend watching the tutorial video for a full breakdown of viewport movement. You can join me on my journey of learning to make games with the Unreal Engine.

Keep getting wiser, stronger, and better.

p.s. There is a pretty good course on how to learn things quickly put out by Simple Programmer that is worth taking a look at.