Skip to content

Instantly share code, notes, and snippets.

@maxweisel
Last active April 29, 2016 22:04
Show Gist options
  • Save maxweisel/1b520678e8a63ffc54197ee9390046ec to your computer and use it in GitHub Desktop.
Save maxweisel/1b520678e8a63ffc54197ee9390046ec to your computer and use it in GitHub Desktop.
void PositionGeometry(Vector3 position, Quaternion rotation)
{
// Position the empty game object.
_controller.transform.position = position;
_controller.transform.rotation = rotation;
// Position cube to be thrown
_cube.transform.position = position + rotation * offset;
_cube.transform.rotation = rotation;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment