Double Selection

Hi, This is my first post to the unity forums.

Unity Is Amazing!

I would like to know how i can make a game where the
character in the game can be selected and then moved

What I mean by that is lets say I have five blocks lined up

And I select 2

{} {}

If i click anywhere on the scene, how would i make it so that the 2 that i selected moved to the point of my selection
and the other 3 stayed put.

Thanks for your answers, Brandon

This is Unity Answers, not forums :slight_smile:

In essence what you need to do is define code for the following task

  1. Select multiple objects. (Suggest investigating raycasts)
  2. Store the selected objects in a list or array
  3. Get the target position (Raycasts again)
  4. Iterate over each item in your stored list and use transform.position to move them to the correct location