Forum rules - please read before posting.

World Space Cursor using Controller Function

Hi guys,

So I've been using the example script WolrdSpaceCursor for a while now and its been working great however when switching input to Controller it stops working.
I'd like to modify the script so it gets the current cursor position instead of the Mouse Position but after reading the scripting guild I can only find ways to get mouse position not the simulated cursor position for Controller input.

Thanks

Comments

  • You can read GetMousePosition to get the position of the cursor regardless of input method:

    KickStarter.playerInput.GetMousePosition ();
    
  • Forgive my basic understanding of this.
    Instead of have KickStarter.playerInput.InputMousePositionDelegate = CustomMousePosition;

    it should be replaced with KickStarter.playerInput.GetMousePosition (CustomMousePosition);

    Correct?

  • No. Replace:

    ray = KickStarter.CameraMain.ScreenPointToRay (Input.mousePosition);
    

    with:

    ray = KickStarter.CameraMain.ScreenPointToRay (KickStarter.playerInput.GetMousePosition ());
    
  • Ok got it working. Thanks!

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.