Skip to main content

Wk04_ INTERPOLATION with BPs = move things



COMMUNICATION:
•  We’re on track, I am expecting next class that you will get more “on-hands” because we want to launch some theoretical subjects. That projector thing doubled with the buggy file threw me over a bit :-// :-//!.
•  What we have to catch up on: for now we’ve skipped the Assignment #1 3Dimport which you will do in-class next week
the BPs Assignment #2 was covered (criteria now back-posted on Wk03 blog entry)
Take photos
Ask me to explain if I am too fast
Take screenshots
Take notes
MUST READ THE WEEKLY BLOG ENTRY when posted!!
PS: I need a video volunteer to film me in class please, this will get you a 10% participation mark on, Best, PG

LAST WEEK:
BPs in general & Basics - Events (red BP nodes) OnComponentBeginOverlap - SetSimulatePhysics - XYZ, XYZ, XYZ - the main file we've worked on since the start of the class: BP_FundamentalsClasses:
https://epicgames.box.com/s/zz9ydnf9bfgdhk771w6z1ss5ldit2dzp
Thinking about your Final Project, groups, ideas etc...

CONVENTIONS: 
for all new objects you will create, please have names begin with: “OCADU-objectName”
BP = Blueprint :)
In any project you do please put your comments in the Level Blueprint accessible from the menu on top of your scene / Level
for small lessons and new functionality: open a blank template file with NO Starter Content, please (explained in Week 3).
Good Practice: leave notes in Level Blueprint for anyone who looks at your file later (including you).

CLASS:
Other basics that you will get covered later
•  3D import
•  Materials
•  Blocking volume
•  Color
•  Plus

Utilities to have in mind: 
•  Delay 
•  Print String
•  Event Tick
•  Drag object to Level Blueprint
•  Leave yourself Notes: by selecting 2 BPs together minimum select  “Create Comment From Selection”
Concepts to have in mind:
•  Vector = a variable entity that contains 3 numbers
•  Float = a number with a decimal (Floating Point) ex: 1.233
•  Integer = a number with NO decimal, ex: 2
•  Transform = x3 Vectors = Position (XYZ) Orientation (XYZ) Scale (XYZ) = 9 values together in one variable
•  String = almost any characters like: MyName, 123you2Aregreat
•  !! Interpolation = computer function of filling-up the space in-between 2 values (2 to 5.533 for example)
•  Keyframe = animation basic term, one value set on a Timeline Curve at a specific time
•  Variable = an entity like a number, a String, a Boolean (find out yourself if curious, we’ll touch on them in class eventually). They are subject to change in-game.
You create Variables on the left of your Blueprint window

Things covered:
•  Variable creation (see below assignment has an example of it)
Getting a variable means "feeding" it to another node, that other node is AddActorLocalRotation needs to know the value recorded inside.
Example in the file named "OCADU_RotateCube2.zip" provided in the Wk4 folder (this week), open the Level Blueprint (top bar, middle) to find the script. Create Variable by clicking on +Variable button, set Variable to "Rotator", compile, add 10 on the Z value in Details.

Drag Variable from left panel into BP background

Get Variable

Attach (or "feed" if you like) the Variable into the AddActorLocalRotation node.
•  Timeline: see the reference file named "OCADU_Timeline2.zip" in Wk4 folder
pls see the Wk3 assignments to learn them:
Timeline 1 & 2(lerp)
https://www.youtube.com/watch?v=JWN7ljhAOMM
https://www.youtube.com/watch?v=yz6sKO98qwY
Note that you can add a Vector Track and use curves to drive your values in time (2ble-click on timeline node)


ASSIGNMENTS:
Assignment #1 (10%):
Move the cube by interpolation.
•  Open the "OCADU_Timeline2.zip" in the Wk4 in our Google Drive share folder
•  2ble-click on the "OCADU_Timeline" Level
•  set your PlayerStart position to X=-300, Y and Z stay the same
•  open the "OCADU_CubeBlueprint"
•  copy-paste the bottom Timeline script 

•  delete the PrintString node coming out of the green Set node
•  delete the Lerp node coming out of the green cable from the green Set node
•  attach a SetActorTransform node to the white cable output of the green Set node
•  attach a "Lerp(Transform)" node to the green cable output from the green Set node
•  rename your new Timeline node to "OCADU_Timeline_3" - optional

•  Create a new Variable in the left panel hitting the +Variable button
•  in the right-side Details panel, switch the type of the new Variable to a Transform (orange) and rename it to "OCADU_TransformEnd"

•  hit Compile, now you can choose to leave numbers to 0 or change a few in the Details Panel of your Variable, if it's all at 0, it will be the center of the world (that's the destination of your cube).

•  Ignore red warnings on Lerp node (it needs inputs)
•  drag the new OCADU_TransformEnd Variable into the Blueprint background and select Get OCADU_TransformEnd
•  attach OCADU_TransformEnd Variable to "B" input of the Lerp(Transform) node

•  attach a "GetActorTransform" node to the "A" input of the Lerp(Transform) node (This will allow your cube to move to the center from wherever it is at the game start)

•  Oh, and don’t forget to set OCADU_CubeBlueprint (In the LEVEL scene!!) to Movable, select it in the World Outliner on the right side
•  attach the EventBeginPlay to the OCADU_Timeline_3 and PLAY
•  your cube moves to the center of the world, keep in mind you should start with your cube place far away to see the effect


Criteria:
0 = not submitted (you have another week but 3 points will be taken out next week since it's easier for you with the samples files revealed)
5 = 50% of the work accomplished
10 = 100%
Evaluation:
must work "live" on your computer when I am looking at it (not later without taking points off), this rule will get enforced on Week 5, the reason is that I will provide the corrections in-class right afterward.


Comments