Issues with traveling on big bad world(ch. 6)

Home Forums Books Mastering Unity 2D Game Development Issues with traveling on big bad world(ch. 6)

This topic contains 10 replies, has 2 voices, and was last updated by  Leonardo 2 years ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #10125

    Leonardo

    Hello again Simon DarkGenesis,

    I have some problem on my game navigation, when I leave from the HomeTown and go to the open World I get the problem of the UI of traveling conversation asking if I wanna stay or travel, I can back to the city but I can’t walk around on World, let’s me show you. (PLEASE click on links to see image on imgur ow code on codeshare)

    First I try to leave from the Home (all ok)

    load screen (all ok)

    When I get on world map appears this two UI one to go on pure fields of home and other to go back to home (being errors here)

    if I try close they the two UI the UI from pure fields close ok because I’m far from trigger, but the home not because I’m stoped on trigger (there)

    I don’t know what is wrong on the code logic, but when I go to the World all travels UI appears first, well close all, but because my character is stoped first on the town trigger this don’t close (this will happen too if I change she location to another trigger, if I change the position to other place where don’t have any trigger all UI for travels appears but can be closed, BUT if i run to any trigger stack until i click travel)

    here my code from MapMoviment and from NavigationPrompt

     

    #10128

    Ok, can’t see anything specifically wrong with your scripts, so the issue may be on your player’s or home collider size.  That would explain why the trigger is being constantly fired.  As you can see in the “Awake” function, you disable the players collider and it is only enabled (in Update) when the player is far enough away from their starting position.

    If you can zip me your Assets folder and drop me a link, I’ll grab it and have a look

    As to the Shader error, that is covered in the “Unity 5 support” post on the books forum here:

    https://darkgenesis.zenithmoon.com/DarkGenesisForums/topic/unity-5-support/

    Simon (Darkside) Jackson
    @SimonDarksideJ

    #10132

    Leonardo

    Well,

    I try to see the player trigger and I try reduce the size of the player trigger to be less than city trigger, and continue with the same error I zip my assets folder and upload here with 4Shared. thx for all help.

    #10136

    Could you put it on DropBox or another site.  Couldn’t get it from 4Shared without signing up or being spammed a million times :S

    Simon (Darkside) Jackson
    @SimonDarksideJ

    #10140

    Leonardo

    DropBox sry

    #10142

    OK, grabbed your project and found one issue.  Although you created the MapMovement script, you hadn’t assigned it to the player.

    This solves the immediate problem of the prompt appearing straight away, as the script runs and disables the collider as expected.

    However, for some reason, it’s refusing to move the player and Unity is doing something weird in the Vector3.Lerp function, so I’m still looking in to that.

    Simon (Darkside) Jackson
    @SimonDarksideJ

    #10143

    Phew, glad I stuck at that for a dew more minutes else it would have kept me up all night.

    Found the remaining issues on your map scene:

    1: You had an animator on the player.  This was preventing the sprite from moving.

    2: On the RigidBody, you still had Gravity set. 😀

    Granted, on the worldmap, a Rigidbody isn’t actually required but it was left in, just in case readers wanted to do something fun with it.

     

    I’ll do some digging in to why the animator was preventing the character moving as that seems very odd.  But at least you should be able to get moving again (no pun intended) with the chapter.

     

    Hope that helps.

    Simon (Darkside) Jackson
    @SimonDarksideJ

    #10145

    Leonardo

    Oh Simons thx! allot serious thx I forget to put the mapmoviment whats shame of mine part =$ but thx for helping, I have fixed over here and now I trying to see why she don’t move xD thx the game is f#$%* beauty my mind flow away I wanna training & practice to make much games =P thx again \/

    #10148

    Leonardo

    WWWWWWWWWWWWWAAAAAAAAAAAAAAAA
    I can’t see problens with the character movement controller the animator is so much simple to make problem I’ll take a look on the MapMovement.cs to see if have some thing missing or wrong.

    #10150

    Your MapMovement script was fine, it simply wasn’t attached.

    The other issues were in the editor, with how the Player was setup. Removing the Animator (the book doesn’t cover adding it on the map) and fixing the RigidBody component’s gravity setting. (actually it was funny watching the player just fall off the map)

    All in all you should be good to go.  Like I said, I’ll look in to the animator and report back as to why that was causing the freezing issue and suggest a plan for animating on the map.

    The fun never ends.  Good luck on your game dev journey

    Simon (Darkside) Jackson
    @SimonDarksideJ

    #10215

    Leonardo

    these days, vacation of the university, playing very FF VII and IX (& life is strange too, yeah I’m a fan Square) and today back to study and see this “Fixed systems/Random generation”  so exciting

Viewing 11 posts - 1 through 11 (of 11 total)

The forum ‘Mastering Unity 2D Game Development’ is closed to new topics and replies.