Search Unity

A lost new member ...

Discussion in 'Navigation' started by mzibraalaae, Apr 16, 2019.

  1. mzibraalaae

    mzibraalaae

    Joined:
    Apr 11, 2019
    Posts:
    1
    Hello,
    I am very new to Unity and C# Scripting, I have had a vision to create my own game, But I am just a student who doesn't have the resources to pay for a project like that.
    So I decided to embark on this journey to learn how to make my own game.
    Without making this too long, I want to make a turn based rpg where you would start with 4 characters and you get to move them every turn by a certain amount of movement points.

    So far I made one of them move on click and the others follow, but I want to move each one individually when selected.

    Thank you for helping a New member of this great community
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,448
    Hi & welcome!

    easy way is to google any issues you encounter: unity select gameobject with mouse

    so, if you have colliders in those characters,
    then can add raycast script to camera, and raycast to mouse position,
    it returns the object that ray hits, then can do something with that.

    https://docs.unity3d.com/ScriptReference/Physics.Raycast.html
    (can also compare gameobject tag or use that raycast layermask to only allow clicking characters, not all colliders)