Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

12 total results found

Prerequisites & Disclaimers

Transform Manipulations for Dummies Chapter 0: What?

I expect you to know how to use the Unity Editor and to know a little bit about vector math and geometry in general.I wont go into too much detail for things that can be found in the Unity manual, but I will link to them when appropiate.

What is a Transform?

Transform Manipulations for Dummies Chapter 0: What?

A transform is a component that is attached to a GameObject. In fact transforms are the only type of components that are always found on a GameObject, as every GameObject must have a transform and automatically comes with one when created. This may make you w...

How do you do maths with a Transform?

Transform Manipulations for Dummies Chapter 0: What?

For doing maths with transforms there are three primarily interesting things stored in a transform that we can manipulate: Position, Rotation and Scale. The position is basically just a 3-dimensional vector we can manipulate. Therefore we can use it to do vec...

Position Constraints

Transform Manipulations for Dummies Chapter 0: What?

Position Constraints are Unity built-in Components that will copy the world-space position of a single target, or blend between multiple positions when given multiple targets. They are a primary tool to manipulate Transforms, hence why I will briefly explain t...

World Space vs Local Space

Transform Manipulations for Dummies Chapter 0: What?

As a lot of people have already explained this concept I will just refer to this post for brevity: https://medium.com/nerd-for-tech/local-space-vs-world-space-in-unity-6a9944470478

Multiplying a Vector by a Scalar

Transform Manipulations for Dummies Chapter 1: Basic Operations

To multiply a vector by a scalar we can use the fact that when a position constraint is given a single target, the source weight wont be normalized. This means we can simply use a position constraint, with a single target (which contains the vector as its pos...

Inverting a Vector

Transform Manipulations for Dummies Chapter 1: Basic Operations

This can be done with the same method as Multiplying a Vector by a Scalar by simply using -1 as the scalar.

Adding two Vectors

Transform Manipulations for Dummies Chapter 1: Basic Operations

To add two vectors we have to get a little creative. I wont explain why this trick works mathematically, but to add two numbers, we can average them and then multiply that by two. Since PositionConstraints can blend i.e. average between two transforms i.e. ve...

Subtracting two Vectors

Transform Manipulations for Dummies Chapter 1: Basic Operations

To subtract two vectors you can use the same method as Adding two Vectors but inverting either vector first by inverting it first. Which one you have to invert, depends on whether you want to: Subtract B from A (A - B) => Invert B or Subtract A from B (B...

Normalizing a Vector

Transform Manipulations for Dummies Chapter 1: Basic Operations

To normalize a vector we can use the LookAtConstraint. Make it look at the vector i.e. transform that you want to normalize. Give it a child with an offset of +1 on the Z-Axis. You have now normalized a vector.     Hierarchy:   As previously menti...

What about dividing a vector by a scalar?

Transform Manipulations for Dummies Chapter 1: Basic Operations

Unfortunately I currently do not know of any method to find the multiplicative inverse of an arbitrary number. If you want to divide a vector by a constant scalar however, you can simply just use the same method as Multiplying a Vector by a Scalar and use the...

Projecting a Vector (in World-Space)

Transform Manipulations for Dummies Chapter 1: Basic Operations

To project a vector in world-space, you can simply use a position constraint, and only have one (to project the vector onto an basis axis) or two (to project the vector onto a basis plane) of the "Freeze Position Axes" toggles turned on.