Forum rules - please read before posting.

Icons in 3d space

edited June 2014 in Technical Q&A
Hi :) there is a way to make the icons of the hotsots (like use/look/ and the name of the hotspots) appear in a 3d space like they are parallel to the hotspots in the 3d space?

Comments

  • If you are using playmaker you can use raycasting to see if the player in pointing towards the object and allow you to activate/deactivate 3d objects when looking/not looking at them.

    Is this what you are mentioning?
  • No :)

    I would like that the hotspot icons are in 3D space and not towards the player view
  • Still not sure what you mean - do you mean ones further away appear smaller in size?
  • I mean something like this

    image
  • Not in AC.  You may be able to do this using Unity's own system, and hook it into AC using a simple script (e.g. to only display when a linked Hotspot is highlighted).
  • Ok, I can configure my own script to make it appear in 3d world like this but I need the USE LOOK and EXAMINATE icon to appear like this...in wich AC script I should look for appereance info of those elements?
  • edited June 2014
    Assuming you're in Context Sensitive mode, this function should return the texture of the active Hotspot:

    public Texture2D GetUseTexture ()
    {
      Hotspot hotspot = GameObject.FindWithTag (Tags.gameEngine).GetComponent <PlayerInteraction>().GetActiveHotspot ();
      if (hotspot != null && hotspot.useButton != null && hotspot.useButton.iconID > -1)
      {
        return AdvGame.GetReferences ().cursorManager.GetCursorIconFromID (hotspot.useButton.iconID).texture;
      }
      return null;
    }
  • I was thinking...isn't much simpler to just have planes to simulate the textures in the 3d world and link them to the the interaction method? there is a simple way to link an object in the scene to an action list?

    I mean..instead of using hotspots I use 2 planes with textures on them placed in front of a door in the 3d world so if I'm rotating the camera the textures are in perspective with the view. how can I link a function like use or look to them? ty
  • To run an ActionList through script, simple call it's Interact function.
  • Can u be a little more specific? I have an action list called EXAMPLE....from a simple plane how do I recall that?
  • To run when you click on the plane? Just attach a collider and the hotspot script!

    To run an actionlist through c script:

    public ActionList myActionList;

    void Run () {
    myActionList.Interact ();
    }
  • ty so much :)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.