Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] Game Kit Controller: Engine with melee, weapons, vehicles, crafting & more! 3.75

Discussion in 'Assets and Asset Store' started by sr388, Sep 1, 2015.

?

What features/systems do you prefer to arrive sooner for next updates on GKC?

  1. AI behaviors options, able to drive vehicles and fire turret weapons

    25.6%
  2. Armor/cloth system: stats, damage resistances, etc… & character aspect customization (fallout)

    30.0%
  3. Cover System and Climb system based on Breath of the wild and Assassins Creed

    36.2%
  4. Online multiplayer (using mirror as first solution and include others later)

    42.0%
  5. VR integration including 1st/3rd person and locked views

    10.1%
  6. Full body awareness (FBA) to see player’s legs, body and arms in first person

    18.5%
  7. More types of controls, similar to Diablo, MOBA & RTS and similar genres

    10.6%
  8. More tools/creator wizards on the asset workflow (tell about them)

    13.4%
  9. Integrations with other assets (tell about them)

    16.2%
  10. More RPG/Scifi elements/mechanics (tell about them)

    12.3%
Multiple votes are allowed.
  1. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    Quick suggestion, is there a chance the autocrouch system could be extended to include an auto vault system? Like for jumping over low wall's almost parkour :)
     
    neodotca likes this.
  2. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Sure, once I get the new animations, I will add that kind of systems, by checking the player's surrounding, with out need to place and configure elements all over the place.

    Regards.
     
    tgamorris76 and neodotca like this.
  3. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    104
    Hey man,

    Just bought the kit, imported it to Unity 2017.3.1 and the WASD and mouse don't work in the demo scenes and the Xbox horizontal and vertical axes are reversed. I imported the project settings, and the input settings are as they appear in the documentation.
     
  4. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Hi @joshua_42.

    Thanks for your purchase.

    Another user has told me something similar with a problem with gamepad, but it seems due to an unity bug in windows 10. It is very strange, we have spend a couple of hours, but I haven't been able to find the cause why gamepad joysticks don't work (the rest of buttons seems to work fine). What windows version are you using?

    About the reversed, yeah, I notice it too and changed the orientation of vertical and horizontal for the gamepad in the unity axes input list. I think it was due to the change of GKC from unity 5.3 to 2017.1.

    The WASD I think that is due to another unity issue with gamepads, here my explanation from previous posts and the solution already included for the next update:

    "Btw, I have checked the gamepad (finally), and like we said, it seems that unity has a bug where even if a gamepad is removed, he stills thinking a gamepad is connected. But there is a way to solve this, by checking the name of the gamepad, if it is empty, it is disconneted, so it can be ignored.

    So this is solved, and also, I have brought back the option to control the input by keyboard or gamepad at the same time, so you can use any of them (also, you can connect a gamepad in any moment ingame or before start the game and start to use it inmediately. If it is removed, the keyboard will work as well).
    "

    So if you want, I can send you the modified input system to being able to change between keyboard and gamepad without problem.

    Regards.
     
  5. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    104
    Yeah, I'm using Windows 10.
    And, yes I'd love the modified system.
    Thanks man.
     
  6. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Ok, I will send you the files by PM.

    If I see that update 2.4c takes much more time, I will upload an update 2.4b-1 adding this input improvement and a couple more of fixes.

    Regards.
     
    Mark_01, joshua_42 and tgamorris76 like this.
  7. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Hi everyone.

    Quick update.

    I am making a few improvements in the player's weapon system. For example, I have added an option to configure camera movement noise with range of amount when a weapon is fired, so along with the configurable shake camera (which only moves/rotates camera), the noise allows to lost the current sight from your target (like weapons from most games), configuring a random range vertical and horizontal. I don't know if this has a better name (very possible), let me know.

    Also, I have removed a little restriction to change between weapons where the player couldn't change them if he was aiming in third or first person, now he can.

    Finally, I have added an option to change to next weapon with ammo if the current one is empty (no bullets in the clip, neither remaining ammo).
    Here a gifs:

    Vertical noise 0/0.1 and horizontal noise -0.2/0.2
    shot camera noise1.gif

    Same camera noise aiming
    shot camera noise2.gif

    Vertical noise 0/0.2 and horizontal noise -0.4/0.4
    shot camera noise3.gif

    Changing weapon while aiming
    shot camera noise4.gif

    Magazine is empty and no remaining bullets change to next weapon with ammo
    shot camera noise5.gif


    There are a few more improvements that I will add today to weapons. Also, I am working in add an option for camera to rotate smoothly according to a value (right now, the camera rotates according to input applying rotation at once). So this will give a better camera rotation feeling.

    Regards.
     
  8. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    Just quick question - am going to pick up this excellent system soon, wanted to know based on experience: with the frequency of great updates the developer adds to this system: is updating fairly straight forward? I mean: if I start using it, and a new update comes along, how seamless is it to import over existing system without horribly breaking a project? I’ve had it happen often enough to know to back up often, but still sometimes “forget”... (ok, sometimes I just throw caution to the wind and am too lazy or pressed for time to back up huge projects)... ;)

    Also: is there a plan to bump up the price any time soon? From reading through the forums, this system is a steal at the current price!!!

    Really looking forward to multiplayer built in instead of hacking it together and breaking things when updates come along. What do you think about porting an already started project over to using GKC, to utilize these slick features, until the “out of the box” multiplayer is added? I’m currently using Invector and a home-brew multiplayer system, but love the idea of concentrating on the custom game-play parts, and levels/scenes/in-game parts so don’t have to concentrate time on keeping up networking and all these cool modules GKC seems to do superbly already...

    Ok, that was a few questions. ;) I’m really digging where I think this system is going and can see using it as the main game controller in a LOT of different scenarios!!! I don’t mind scrapping a lot of what I’ve already put together when this looks so cleanly done!

    Great work, sr!!! Awesome kit!!! Will be purchasing for sure!
     
    sr388 likes this.
  9. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Speaking of weapon, for controller will you implement aim assist like that?



    Also another trick is that bullet "cast" (the size of the bullet or the raycast angle) increase with z proportional to the pixel resolution angle to combat screen "aliasing" of target and input resolution.

    Generous setting are useful for game where the goal isn't on precision shooting (ie adventure game) but also want to add small sequence of tension. Literal auto aim would be cool for that same reason, for example when aiming down sight, the weapon auto aim the current target magnetically, at the most extreme, a system of aiming like og tomb raider (always target the closest enemy in the direction, even out of sight, which bring focus on positioning and movement), or metroid prime on game cube (lock on) and its evolution on metroid 3 (camera lock on with free aiming around the screen).

    Similarly an interaction/aim mode, that lock the camera but allow free aiming on the screen (a la resident evil wii) for smoother and more stable way to interact with object. And the same thing triggered by interaction too, ie you get to interactable object and it lock you in a view mode (and position you eventually on the a hotspot position seamlessly) where you can freely interact (for example pushing button), a bit like shenmue but with actually your hand/object/cursor, a bit like enviro bear 2000.

    Also I'm increasingly interested to use GKC for realizing the running version of this :D
    https://neoshaman.github.io/Javascript-experiment/
     
    sr388 likes this.
  10. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Hi @danreid70.

    Thanks for your interest in the asset and feedback.

    Haha, good phrase the last one (though I am a paranoic of back up projects).

    I couldn't tell you how much actually cost to update a project with a new version of the asset, since every project is a world, so it would depend of the extension of the changes in the project (did it the prefabs changed? new code has been added? etc...).

    In the last updates, I have made some important structure changes or improvements, but in the outside, most of the things barely have changed, most of elements are new options and better ways to work, easier workflows, etc... and of course, new elements, like the inventory bank, checkpoint system or improved save system for the current update in process 2.4c.

    Also, if a big system needs a big change, I take into account the best solution that could be done with the minimal external changes (like a lot of new elements reassigned in inspector or a lot of new layers or tags added or removed).

    Other users can tell better their experience with update their projects, but the most important element that needs to be rebuild is the player controller, since usually, new elements have been added, like used in the UI, transforms used for raycast or similar stuff, so an older controller could cause some issue.

    I usually change the price of the asset from time to time (last time was an increase of 5 dollars less than two months ago). These increases are made when I feel that a huge improvement has been done (though most of the updates make me feel that previous version is garbage xd). But I don't want to find myself with an asset of 200 dollars, I know the asset could cost a little more, but I feel more comfortable with an affordable price. I know, some people would say, what a dumb thing or some people even feel more convinced of buy a more expensive asset just for the higher price. Even than a low price could mean that there is a trick and the asset is useless or broken.

    Anyway, I prefer to change the price when the last update deserves it. In fact, there will be an increase soon for the update that will bring a lot of new animations with a rebuild animator and a new 3d model, which will allow me to improve the third person shooter/movement feeling.

    Yeah, multiplayer will be made this year.

    The first step will make a system to change between two characters, one controlled by the player and the other by AI which can receiver orders from player (like in resident evil revelations 2).
    Next, split screen with 2 to 4 players.
    Then, online will be added.

    This order is due to have a system able to manage more than a player (for gamepad input, UI management and game mode itself), though in different previous updates these most of considerations have been done, so the addition of another player in scene won't take too much.

    That scary the crap out of me..... haha, just kidding.

    Well, porting a project is a lot of work, no matter the type of project, according to the time/effort already spent. But like everything, you need to valorate the pros and cons for this. Consider if your prefer to invert the time that could take to add interactive systems and modules to your current project, or use it to port the game.

    I don't want to try to sell the asset with easy talk, I prefer facts and I am here to help, so whatever your decision is, I will support it. Like you said, I don't like neither to work with different assets parts (or frankestein projects like some user call them), it was one of the reasons why I started this asset, to have in one single asset all what you could need for a game, though of course, I want to support integrations with other assets for systems which could take me a lot of time to make by my self and focus in my own stuff.

    Also, if you want (and are able), you can show your current project here, to take a look at its state.

    Thanks also, for the amazing message and support.

    Ufff, and sorry for the long text xd.

    In fact, I am the guy of the nordic long hair and beard who talks in the video......I wish xddd.

    But yeah, that systems looks a really interesting aproximation to the aim system, more organic. Added in the todo list ;)

    It would work with the current aim assist, which currently (like most of systems), takes out the control of the camera for a really short time (which is almost not noticeable) to aim to the target.

    I don't know why, but I feel like you want a regular aim assist (I could be wrong), which is already added, for weapons in third and first person when the player aims and for free movement using an input action. This is configured in the Player Camera inspector and has a lot of different options (like target closest object to center of the screen).

    lock target3.gif

    lock target4.gif

    lock target5.gif

    aim assist mejorado.gif

    This will be extended and used for the zelda/dark souls style combat.

    That same system that you mention could be used for puzzles for example, right? Similar to the room saga:



    In that case, I am really interested in make a system like this for puzzles, to increase the adventure genre in the asset.

    This would be added using the current examine objects which allows to set the camera in a fixed position and interact with an object, push buttons, etc... adding options to drag and drop inventory objects, push and rotate objects.

    But yeah, the addition of different options, like the magnetism system or the lock target and free wepon movement sounds very cool.

    All of them thrown in the todo list.

    Oh, that is really cool. In fact, I can use this to structure the mission/quest system and the management of the game, adding a group of options for something like this "type of game and rules".

    Really nice, I will keep that link.

    Btw, here the video for the weapons improvements of before:



    Regards.
     
    neodotca, tgamorris76 and Wetw0rx like this.
  11. Wetw0rx

    Wetw0rx

    Joined:
    Jun 30, 2017
    Posts:
    125
    Awesome stuff here as usual.

    So I managed to put together a simple but working set of scripts for docking one vehicle to another. I've only tested it using hoverbikes but cars and motorbikes should work just fine too. Let me know if your interested in my hack job and I'll post it. Its all modular and I didn't have to change any GKC scripts (except make the "isTurnedOn" bool public in the hovercraft controller script) Still haven't tried adapting the cockpit screens to other vehicles yet but thats next.

    I'm currently looking to implement a button to unlock the cursor for clicking buttons and I thought I saw @tgamorris76 mention it before. If there is some code laying around for that, I'd love to take a look at it. I know the pause menu has a function for it so maybe I'll just copy that. I want to have it so as long as I hold some key down, the cursor is free. Just like holding "f" key in Star Citizen.

    BTW, I don't know if it's intentional but while mounted on the hoverbike, if I press "N" key, it toggles the cursor free/locked. It's useful actually.
     
    sr388 likes this.
  12. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    hi wetw0rx :) heres the original link dev(sr388) sent me, attach the code to the GKC prefab and drag the player controller game object into the slot provided, u also have to go into input manager script for GKC and create another key press to be able to use it at runtime

    https://pastebin.com/t0rQ3jA3
     
    Wetw0rx and sr388 like this.
  13. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    That is awesome! I have seen the roadmap you have listed, and the systematic approach to step by step introduce multiplayer (networked) is perfect! Separating the controls to where individual units can be controlled and switched between in itself is another thing I really want!

    I'll be purchasing very soon! Very enthused about this kit! And the response times, updates, "transparency" and just plain attitude here between dev and users is excellent!

    Regarding my re-building of my system to incorporate GKC - no worry at all - like many on here (I'm sure), I've rebuilt from scratch so many times, it's become a no-brainer. :) The concepts keep evolving, and I keep exporting packages of the assets that are continually common - and building the scenes will mostly be procedural.

    Keep up the great work! I'll be checking this forum thread every day! It's always entertaining! :)
     
    hopeful, Wetw0rx and sr388 like this.
  14. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    LOL I was actually presenting all of them, but I'm a fools, I put all of them in a run on sentence, instead of an itemized bullet point list. It seems like you think it's a single proposition, my bad. Here it is more clear:

    1. Also another trick is that bullet "cast" (the size of the bullet or the raycast angle) increase with z proportional to the pixel resolution angle to combat screen "aliasing" of target and input resolution. (This is generally use for non hitscan weapon, aka projectile, compensate lack of precision at distance due to resolution of screen and controller)
    2. Literal auto aim: when aiming down sight, the weapon auto aim the current target magnetically (like you have shown but without the lock on, just magnetism on mode shift, doesn't stay if camera move)
    3. a system of aiming like og tomb raider (always target the closest enemy in the direction, even out of sight, which bring focus on positioning and movement). (basically no manual aim, the character do the aiming and camera DON'T adjust)

    If you look carefully, you will notice that it's the player who adjust the camera, sometimes thing get out of focus, but the character still aim toward enemy, and can actually target multiple with the two gun.

    4. metroid prime on game cube (lock on) (you have that on shown in your example, clearly only focus and aim on target)
    5. metroid 3 (camera lock on with free aiming around the screen). (It's a lock on but you can freely aim around teh screen, only camera is locked, ie you can aim at each free corner easily, it open game design at not locking on weak point or reacting to environment without breaking the sight of object locked, for example you lock camera on one character, but still can aim toward another on screen, more usable with mice or wiimote)

    I think the basis are already there, so why not make a complete system

    I have the same problem here with run on sentence, however I didn't though about the room lol. Which is a multiple interaction hotspot position with nested interaction view, neat lol

    1. Similarly an interaction/aim mode, that lock on the camera on objects but allow free aiming on the screen for smoother and more stable way to interact with object. (basically like the metroid 3 shooting lock on, but for objects, but still free moving around, just the camera is locked, it's like below but with control of movement)

    2. A variant where you just basically freeze the camera and decouple the aiming for interaction (a la resident evil wii), player control both the camera and the aiming but separately.


    3. And the same thing triggered by interaction too, ie you get to interactable object and it lock you in a view mode (and position you eventually on the a hotspot position seamlessly) where you can freely interact (for example pushing button), a bit like shenmue but with actually your hand/object/cursor, a bit like enviro bear 2000.


    (You can move your hand or cursor freely to interact, the game transition to a hostspot position and lock the camera) you have little to no control on camera as the interaction stay in focus). The room is basically a multi hotspot on rail navigation of this.

    I'm thinking aloud:

    1. Which makes me think, what if instead of point we could have "line and plane" lock on, so you don't just move around a single point but a the closest point on a bigger primitive like a spline.

    2. And what about locking only motion on those primitive? I mean like motion in sonic unleash, you can still move freely but it's adjusted to the path. I mean you aim at a wall and walk parallel to it, directed to it, but at the extremity it behave like a point which allow to transition seamlessly to the back.


    3. A 3 mode of interaction for social interaction:
    a. holstering mode: the item is not in the hand of character, generic interaction happen.
    b. holding mode: the object is in the hand and allow for objects specific interaction, but it is not about using the object, for example talking about it and have social impact (hold gun allow you broadcast threat but not intent of immediate harm, which can work as intimidation, hold flowers and npc may ask you who they are for)
    c. Aim mode: basically a form of aim down sight, directed and precise interaction with the object, broadcast intent of using the object by aiming it at target, like hammering or shooting the weapon, just pointing the object have immediate social social feedback toward the target, aiming a gun directly at someone will make him freak out, aim flower and the target will understand it's for them).

    I'm done being a fool lol,if that's inspire you, you have no obligation.

    I wouldn't advise you to use that as a starting point, it's a bit random, I was testing javascript. For example it doesn't break down thing correctly, the list of element is unbalanced, and some thing are mixed, for example level has both structure (linear) and mean of navigation (on rail) which is not great! lol
    I think the quest system need some revision, many element are simply not practicable and I have botch failure and progression, which should be type of quest in term of structure. It's just not complete enough, it lack the declaration of many function (like resources used, detail of progression) and it mean I need to have an actual solver or more complex representation with selection of class of objects within class.
    And below is a cryptic generation of story parameter that is actually jargony as you need a reference to make full sense of what it is doing.
    The source code can help as there is some annotation and comment, but it's still lacking and WIP:
    https://github.com/Neoshaman/Javascript-experiment/blob/master/gameIdea.js
     
    Wetw0rx, ChillyMcChill and sr388 like this.
  15. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Sure, feel free to put the files here for the cargo vehicles. I haven't been able to work on that yet, but it could boost that work part.

    The cockpit component uses the info from vehicle hud manager script, so it can be used for any vehicle without any further modification.

    To unlock the cursor, there are a couple of functions in Menu Pause script for that. Use this couple of functions:

    menuPauseManager.showOrHideCursor (shotCursorState);
    menuPauseManager.changeCameraState (!shotCursorState);

    Also, now that you mention that kind of scheme control for the cursor, I will add it to use a real control panel in vehicles, like in the train or start citizen, to for example, to set weapons to manual or automatic, set ship speed, etc....

    Yes, press N (by default) shows the controls input in the current vehicle.

    Thank you very much for your support and nice feedback, I really appreciate that.

    I should update the roadmap to add more content, there is a lot of cool stuff that I have in a separated file (of almost 50 pages already of future features and systems xd).

    For example, taking advantage of the already made locked camera system and checkpoint, I am going to add a crash bandicoot style controller (it is one of the controller types that I always wanted to do), with a camera following a list of waypoints, to add a platformer game style to the asset (like jump in top of enemies, break boxes to get fruit/coins for lives, temporal powers, unlockeable skills, instakill elements, boss system, etc...), most of the pieces for this is already done in the asset, so it will be quick to add.

    Can't wait to start in the multiplayer (the game a way out has awaken a big desire to work on split screen too, to work on coop puzzles and similar, amazing game).

    Yes, it is very important to show any progress here, get opinions and feedback, tell any thought that comes to my mind, this community here is amazing and helps a lot in any kind of stuff.

    Hahaha, happy to hear that. I know that rebuild or update is a really (insane) pain in the ass, but I want to work on that to make as painless as possible.

    Thanks again for the message, very nice :D and happy to know more people that find GKC useful for their projects.

    Oh, I see, my mistake, sometimes is hard to get the point of a post.

    Thanks for the further explanation of these aim systems, actually all of them are very useful and allow a big number of options for different kind of games and control and I think they are very achievable. Consider all of them done ;)




    Oh yes, same as the previous, consider them added in the todo list, I can resist to work on metroid mechanics (literally, all this post your is copied and paste in the doc file where I organized elements, it explain very detailed every system).

    I am not sure of this system, is there any example in a game to take a look?

    Mmmm, something like in metal gear, where you aim weapons to an enemy and they just surrend to player. I actually thought about this, for enemies for example, and for the faction system to make peace with a faction who consider player an enemy, so bring an object or drop at them, can turn them into friend factions again.

    Very interesting, could get some cool interactions.

    Absolutely, and don't doubt, keep bringing this juice inspiration haha (no kidding).

    Don't worry, the idea is not to make a system like this, but it made me think about a set of options to configure in the game, to set the rules of it, the type of game developed, style of missions/quests, etc....even a random game creator (with of course, its limitations).

    Overall, elements to configure what things can happen in the game, what action is triggered by another, etc... to make a better interconnected world inside the game.

    Thanks again for the help and suggestions, pure gold to keep bringing new systems.


    Btw, I have added a smooth camera rotation option, configuring the vertical and horizontal speed, so you can now select what type of camera you need.

    Regards.
     
    danreid70 and ChillyMcChill like this.
  16. ChillyMcChill

    ChillyMcChill

    Joined:
    Nov 17, 2016
    Posts:
    57
    You have multiplayer working with invector? :eek:
     
  17. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Hey! Thanks for considering my points!

    No there is not, the closest example would the room video you presented, but with seamless movement (like lock on) instead of snapping fromp hotspot to hotspot, basically imagine between two hotspot you have control that simply lerp between them while you move. Just like you move in circle around a point when you lock on, you would move according to the spline target. I was visually imagining use case of the lock on when I realize we could also use a spline, for when object are bigger. That's just an observation, like I said I was basically thinking while typing, I just let the idea out in case of!

    I would say yes and no, usually in games, b and c are mixed, for gun b would be shooting from the hip, there is a small innovation in that I make a gradation of intent, ie you can only use object in c, while b is just there to create a context switch, useful when it's a cop game and not a war game and you have to negotiate with situation without firing but applying pressure. In usual game, the confusion of b and c create problem when you want to interact a certain way but the game react another way because you mispress a button at the wrong distance. Also, since c is based on a button to context switch, it can also remap all button to specific command related to the object to add extra nuances, for example b. could favor navigation button like jumping, but in aim mode it favor command like what a cop would say to warn a suspect like "don't move", "get down", etc ... FPS already use the aim mode as a modulation of movement (no aim, fast movement, less precision to shoot) vs firing (precision to shoot, limited movement).

    Remember when we were talking about planet generation at the beginning of the thread? I'm actually working on it! The goal is to pose basis for procedural generation of everything, so like you and gkc, I'm working on a project to explore all the basics I need, starting by the most complex aka planet tiling, and the find way to exploit the tiling for map like city lay out.

    Basically pcg can be reduced to a set of primary technique (templates, (generally noises) functions, grid hash and graph), I'm trying to get them to work with modeling like in .kkrieger. I hope to end up with planet of arbitrary shape. I'll also need to work on convex hull to create something like spore creatures' creation, but generalized to everything.

    You are working on character interaction, I'm working on map and terrain generation lol. I hope the mixing of the two will produce the biggest game and more diverse in design ever made lol
     
    sr388 and Razmot like this.
  18. Wetw0rx

    Wetw0rx

    Joined:
    Jun 30, 2017
    Posts:
    125
    Thanks bro! This will save me some time.

    (edit) This is much better than what I would've come up with lol. It works perfectly thanks again
     
    Last edited: Apr 20, 2018
    sr388 and tgamorris76 like this.
  19. Wetw0rx

    Wetw0rx

    Joined:
    Jun 30, 2017
    Posts:
    125
    OK , so to make the vehicle docking work, I used three scripts. This method can be used for cars, bikes or boxes but this is an example of docking a hoverbike on a large aircraft/ship.

    1. All the magic happens in one script but the hovercraft must be ready for transport first. This involves turning off most of the colliders and changing some parameters. I chose to do this when the hovercraft is turned off by the player (H key by default). Be sure to set the bool "isTurnedOn" to public in the GKC hovercraftController script.
    The script below "noLev", lives in the hovercraft controller. It sets all the rigidbody parameters to values that wont cause trouble for the large vehicle towing it, turns off the hovercraft audio, turns off all colliders not set to trigger and turns the gravity multiplier to 4 to make the hovercraft drop to the ground when the craft is turned off. GameObject "ballast" can be the hovercraft mesh parts. That leaves the mesh colliders on the engines and I just delete those but they can be moved to hovercraft mesh parts to be deactivated with the others.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class noLev : MonoBehaviour {  //place this script in the hovercraft controller
    6.  
    7.     Rigidbody rig;            
    8.     hoverCraftController con;
    9.     vehicleGravityControl grav;
    10.     public GameObject audio;         //the audio source elements from the hovercraft
    11.     public GameObject ballast;       //transform containing all but one colliders not set to trigger
    12.  
    13.     void Start () {
    14.         con = GetComponent<hoverCraftController> ();
    15.         rig = GetComponent<Rigidbody> ();
    16.         grav = GetComponent<vehicleGravityControl> ();
    17.     }
    18.  
    19.     void Update () {
    20.    
    21.         if (con.isTurnedOn) {   //set default values while hovercraft is on
    22.             grav.settings.gravityMultiplier = (1f);
    23.             rig.isKinematic = false;
    24.             rig.mass = (400f);
    25.             rig.drag = (.15f);
    26.             rig.angularDrag = (.25f);
    27.             audio.SetActive (true);
    28.             ballast.SetActive (true);
    29.  
    30.         } else if (!con.isTurnedOn) {    //make the hovercraft heavy so it drops when turned off then wait a sec
    31.             grav.settings.gravityMultiplier = (4f);
    32.             StartCoroutine (wait ());
    33.         }
    34.     }
    35.  
    36.     IEnumerator wait () {
    37.  
    38.             yield return new WaitForSeconds(1.5f);  //give the hovercraft a sec to settle before turning its gravity off
    39.         if (!con.isTurnedOn){                       //set these cargo friendly values when hovercraft is off
    40.             rig.isKinematic = true;
    41.             rig.mass = (.000001f);
    42.             rig.drag = (0f);
    43.             rig.angularDrag = (0f);
    44.             audio.SetActive (false);               //sloppy way of stopping audio from playing when not wanted
    45.             ballast.SetActive (false);             //turn off all colliders except one mesh, box or capsule collider so
    46.                                                    //the player can't walk through the turned off hovercraft
    47.         }
    48.     }
    49. }
    50.  
    2. Even in this off state, the hovercraft is not ready for transport. All control systems and colliders must be deactivated.
    I set up a sphere collider trigger (on the vehicle layer) that detects the player and is slightly larger than the hovercraft. The script below "basicTrigger" handles this. It lives in the same transform with the sphere collider trigger and OnTriggerStay, the hovercraftController, vehicleGravityControl and VehicleHUDManager are enabled, then disabled OnTriggerExit.
    Also, one mesh or box collider that accounts for the whole vehicle is enabled/disabled here. I do this because the previous script disables all colliders in a group I called "ballast" because they help balance the craft but I still need at least one collider to bump into when the craft is off/parked and the player is near. However, all hovercraft colliders must be turned off before it is transported.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class basicTrigger : MonoBehaviour {   //place this script on transform with a sphere collider thats bigger than the hovercraft
    6.                                               //place this sphere collider anywhere within the hovercraft controller hierarchy
    7.  
    8.     inputActionManager actionmanager;
    9.     [SerializeField] private Collider main;   //the only collider left on when hovercraft w/ noLev script is tuned off
    10.     [SerializeField] private hoverCraftController con;   //drag hovercraft controller into here
    11.     [SerializeField] private vehicleGravityControl grav;  //here
    12.     [SerializeField] private vehicleHUDManager hud;  //and here
    13.  
    14.     void OnTriggerStay (Collider other)    //enable systems when player is near
    15.     {
    16.         if (other.tag == ("Player"))
    17.         {
    18.             main.enabled = true;
    19.             con.enabled = true;
    20.             grav.enabled = true;
    21.             hud.enabled = true;
    22.         }
    23.     }
    24.  
    25.     void OnTriggerExit (Collider other)   //disable systems when player away
    26.     {
    27.         if (other.tag == ("Player"))
    28.         {
    29.             main.enabled = false;
    30.             con.enabled = false;
    31.             grav.enabled = false;
    32.             hud.enabled = false;
    33.         }
    34.     }
    35. }
    36.  
    3. So finally the wrap up. This script "docking" lives in the hovercraft controller too and does the actual parenting of the craft to any collider named "dock". The collider can be placed anywhere (truck, ship, elevator, etc). The collider can be any size or dimensions but its transform must be a perfect cube of any size to avoid scaling wierdness on the hovercraft while docked.
    Don't forget to put the collider on the "Ignore Raycast" layer.
    Set the layer of any floors or ramps the hovercraft will be travelling over to "Default" so the craft can hover properly on them.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class docking : MonoBehaviour {     //place this script in the hovercraft controller
    5.     public bool Docked;
    6.     public GameObject curDock;
    7.  
    8.     void OnTriggerEnter (Collider col){  
    9.         if(col.gameObject.name == "dock") {
    10.             this.transform.parent = col.gameObject.transform;
    11.             Docked = true;
    12.             curDock = col.gameObject.transform.root.gameObject;
    13.         }
    14.     }
    15.     void OnTriggerExit(Collider col){
    16.         if (col.gameObject.name == "dock") {
    17.             this.transform.parent = null;
    18.             Docked = false;
    19.             curDock = null;
    20.         }
    21.     }
    22. }
    And there it is. At this point, you can drive a hovercraft onto a large ship or truck and drive away. BUT! If you do this for a ship and hit the boost, the hovercraft might fly out. I couldn't figure out why so...
    The following script is meant to prevent this but it might not be the best solution especially if the docked hovercraft is visible by the player while driving the ship. Essentially, this next script "boostProtect" simply deactivates the "dock" while boosting. It prevents the hovercraft from falling out of the large ship while moving fast but also makes the hovercraft invisible so yeah. (Didn't say it was perfect, but it works). You can get by without this script but if your large ship is very fast while boosting, the hovercraft might just fall out. If so, put the script below in the aircraft controller of the ship.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class boostProtect : MonoBehaviour {
    6.  
    7.     airCraftController ship;
    8.     public GameObject dock;
    9.  
    10.     // Use this for initialization
    11.     void Start () {
    12.         ship = GetComponent<airCraftController> ();
    13.     }
    14.  
    15.     // Update is called once per frame
    16.     void Update () {
    17.         if (ship.usingBoost) {
    18.             dock.SetActive (false);
    19.         } else if (!ship.usingBoost) {
    20.             StartCoroutine (wait ());
    21.         }
    22.     }
    23.  
    24.     IEnumerator wait () {
    25.         yield return new WaitForSeconds(6f);
    26.         dock.SetActive (true);
    27.     }
    28. }
    29.  

    This technique can be used to dock anything to anything else really with little modification. In this case, The hovercraft can be driven onto a large ship, turned off and walked away from. The hovercraft is automatically docked and the large ship ready to fly. When ready to retrieve the hovercraft, simply walk up to it, mount it, turn it on (if it doesn't turn on automatically) and go. This also helps performance as the hovercraft's scripts are all disabled while the player is away. Its a WIP but I hope this helps. Have fun! ;)
     
    Last edited: Apr 20, 2018
    hopeful and sr388 like this.
  20. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Reference frame is surprisingly hard, especially when dynamic, and I find little docs about it :(
    I only found loose suggestion and they all seems to go in different implementations, the one I vaguely remember now, is that there is gdc talk about physics update on the train sequence in unchartred 2 that deal tangently with the problem.

    It's basically moving platform, but why it's so hard to find all the tried and true implementation is beyond me.
     
    sr388 and Wetw0rx like this.
  21. Wetw0rx

    Wetw0rx

    Joined:
    Jun 30, 2017
    Posts:
    125
    Yeah this is basically a cheap workaround. Thing is, the rigidbody cant be turned off and setting it to kinematic still doesn't cut it. You could turn off the whole gameobject containing it but that would turn off the mesh renderer too and I wanna see the cargo in there. I couldn't be bothered with destroying/instantiating/replacing with rigidbody-less dummy model (overly complicated). This implementation is very specific but its good for me since I can work within its limitations. I didn't want to change GKC scripts and did try to keep it simple. In the bigger/ faster ships in my project, the pilot never sees the cargo so its all good. For smaller ships where the cargo hold is visible from some outside angles, the speed is toned down just enough for Unity to be happy. But hell yeah its a doosey. During testing, some of the trials had some really alarming results with crazy physics, teleportation and explosions.
     
    sr388 and neoshaman like this.
  22. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Mmmm, I see, so it would be like something to move an object between two waypoints, but having control of the amount of movement, so the transition is not from point to point only. I thought about this for the crash bandicoot camera system from above, bascially an extra option for the locked camera system to define a serie of waypoints and the camera would move toward the closest waypoint to player, but adjusting the distance, so the movement is along the line between every couple of waypoints (I am not the best explaining this). Similar thing would be for spline, only applying the spline algorithm for the movement (similar to a roller coaster).

    Uhum, I think I get your point, though I am not totaly sure how this could be integrated. I want to think about this.

    Yeah, I remember it and sounds very cool (like we said, a bad part of no man sky was the lack of interaction, mechanics and objectives, though in new updates, they are working to solve this and lets see what new content they bring to E3).

    Sounds really cool the system you are making. Any result or help you could need, feel free to tell here, it would be cool to see both projects working together.

    I didn't add that script to the project (since, it was an example of how to lock/unlock the cursor), but since people could need it at some point, I will add it to the asset


    Pretty cool work. Most of it is what I had planned to do. I will try these code and see if any improvement can be made.
    Yeah, some problem can happen when a rigidbody is parented or moved inside another rigidbody. Maybe adding some extra checks the above problem of the hovercraft falling from the ship can be fixed (I would disable totally the vehicle gravity control while docked, applying force to a rigidbody inside another

    Thanks for share the script.

    Yeah, physics are a mix of pain in the ass and black magic sometimes. I will check the work of these code and be back as soon as possible. If any problem related to rigidbody happens, I will check forums to get info about possible solutions.

    Also, you mean about floating point, right? For large scale levels. Yeah, it is a really complicated stuff, though I am very curious about it.

    Don't worry, maybe some little modification needs to be done in a current vehicle component (in that case, the best would be vehicle HUD manager, since all vehicles have this component, so one change is applied to all of them).

    Also, the vehicle will be visible in cargo ;) The best solution should be to just disable or pause the vehicle controller script itself and the gravity control along with control the rigidbody, to prevent these weird situations, no need to destroy any object.

    Regards.
     
    Wetw0rx likes this.
  23. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Thanks for the offering :) I need to solve some fundamental first, so first prototype is to make the ugly step brother of no man's sky game, if I can spawn object correctly on planet, make road and city layout and seamless transition from space to ground, it will be a great starting point! Even if it's boring the hard part will be done and another game could be build on top.

    I was talking about the issue wetworx was talking about, not floating point or just physics.

    Reference frame is a term I heard used in the industry when working there. Basically think of moving platform, if you jump, you do it relative to it, you stay above the platform, aka the platform is a reference frame to the coordinate of the player.

    The simplest way to do it is parenting, but that's problematic, especially in engine with physics system, it makes thing wacky when you parent and un parent constantly, and also have non desirable behavior if you stay parented. It seems that most other implementation use custom transform matrix just for them. like in


    Not all games have reference frame, mario 64 had partial reference frame, works when you are on a platform, but if you jump the platform move below you, which may or may not be desirable. I mean if you try to jump off a moving platform to a fixed platform, you might miss the fixed if the reference frame ties your movement to the moving platform.

    In contrast galaxy has full reference frame on platform (they don't move below you when you jump, you stay above it, it also have constant and complex shifting of reference frame due to various gravity and platform mechanics.

    Reference frame can apply to position, but also rotation, in mario 64, when a platform rotate, you stay in the same orientation, in zelda BOTW, there is no rotation frame, when the raft rotate, you do not (though it might be only when you do an action, I need to check).

    So not only implementation is complex, but also design, generally you have a structure that register the last point of collision to use a reference frame, and reset it when there is other collision, or it behave differently depending on state, a reference frame to a moving platform keep you position on the platform, but if you jump and the platform change direction, it doesn't update you in the direction.

    The most complex are multiple moving nested reference. Like a car on train with a plane above it, good luck synchronising, all the moving part. There is also ambiguity. Imagine you have a space ship going inside a big freighter tunnel that is also moving and rotating, it does not make contact, when did it start using the freighter reference? It's both a technical and a design challenge, it's especially true when you have situation like the demo of beyond good and evil, where do you signal the player, when the smaller ship is using the bigger ship reference? do we blend the reference base on distance?
     
    sr388 likes this.
  24. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Sure, no problem. Yeah, it is the part which can create some frustration, but the good part is that we do this because we like it and eventually, we can find a way to figure it out (though somethings are almost impossible, at least without a lot of time and researchment).

    Oh, I see. Yeah, it makes a lot of sense now (I though you were talking about planetary scale problems), and like you said, it is something important to decide the type of interaction at the beginning of the game.

    Exactly, it is a very complicated thread with a lot of possible and different situations which need to be defined and taken into account, lot of work. Especially complicated in games similar to planetary scale (if you plan to have a real solar system with everything orbiting and moving, even using real light ilumination from the closest star and taking into account moons, I think no man's sky wanted to do this, but they finally didn't).

    Regards.
     
  25. Wetw0rx

    Wetw0rx

    Joined:
    Jun 30, 2017
    Posts:
    125
    Good thread, guys. In this case, the issue is minimized by turning off all the colliders and setting the rigidbody of the vehicle getting towed to kinematic, all drag to 0 and mass to .000001 (0 mass is not allowed :confused:). This works fine for the most part and this is one of the times that Unity has surprised me with its capability.

    The parenting of the small craft takes place as soon as you drive into the "dock" with the hovercraft still being the reference frame for the player even while parented to the large craft (this works perfectly unless the trigger for the dock is not a perfect cube). When the player turns the small craft off, I really just wanted the hovercraft to stop hovering so at that point thats all that happens. When the player walks away from the hovercraft he exits a trigger that turns off all colliders and all systems in the hovercraftController gameobject (gravity, HUD and the actual controller) this is the only way I could get the parenting to stick without problems (mostly). As it is now, it could use a few checks more and can be tweaked for different vehicles, etc. but it works surprisingly well. Its even possible to parent several vehicles, boxes, etc. to the large ship without any real issues.

    Because all cargo would have a trigger on it to turn on/off any meddlesome systems according to the proximity of the player and since the player can only be in one place at a time, the reference frame thing doesn't come up until moving really fast. At which point the towed vehicle could become unparented. This is still a mystery to me since everything is off except the mesh renderer. But apparently, Unity is still making calculations for the .000001 mass of the hovercraft rigidbody. Like sr388 said though, maybe a restructuring of the components would help as seperating the mesh renderer from the rigidbody would allow us to turn off the systems in one line of code without affecting the vehicle graphics. Sounds like a tough gig though since the GKC vehicle system works so well as it is. Maybe just moving the rigidbody to its own gameobject would do it without having to rewrite too much GKC code if any. I'll try this and see...

    Really this is possible because GKC is laid out so well. I took a non invasive approach and it paid off with a simple solution to a very complex problem. A drawback may be that this solution is really only good for a single player game as it doesn't account for the possibility of more than one player but its probably only an issue if you want to walk around and dock/undock on moving ships. For now, all docking takes place while the large ship is parked and no walking around on moving ships so maybe it could do multiplayer too.
    For my purposes, in outer space, movement is easily faked and players wont notice that the ship really isn't moving while docking. With this system in place, it'll be easy to set up some interesting cockpit displays and button options (like a camera to check the cargo hold from the flight seat or a button to jettison cargo, etc.)

    To be honest, I'm an average coder at best and math fries my brain. I love logic though and its fun to solve problems with as little moving parts as possible.
     
    Last edited: Apr 21, 2018
  26. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    Love ya work wetw0rx :)
     
    Wetw0rx likes this.
  27. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    Was able to do a system which allowed me to get a wheeled vehicle on board my aircraft ripoff, but it involved disabling a static model with no scripts and enabling a wheeled vehicle with scripts, so docking was drive unto palet, park withing the boundaries and then push a button on palet to "lockdown" the vehicle which disabled the script inclusive vehicle and enabled the static model. with zero weight.
    I can only script with plyBlox visual :( but it kinda works till dev gets around to a more inclusive solution, hoping to have a spec ops carrier, a small wing of fighters and a barracks with up to 10 marines. At the bottom deck a small APC, a small truck with turrets and a couple of hovebikes...)
     
    sr388 likes this.
  28. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Yeah, the scale when parent is made is important, with scale 1:1, the good part is the the size of the trigger can be resized as needed.

    Maybe a solution could be to change the parent of the docked vehicle meshes and disable the rest, so all possible weird behaviours could be avoided.

    If the player enters this trigger, the docked vehicle is reconfigured again to be totally operative and viceversa. Of course, in this situation, the ship with the other vehicle inside should be static or not moving in that moment (maybe this can be managed later for a better working).

    But by what you say, it seems to work with any real problem, very well done ;). I already take into accoun that the cargo could need some modification in the current code, but it will barely need some elements, most of the code was going to be in new components, as you made.

    And yes, all the elements will be addapted to work with multiplayer (some of them won't need any modification, since some time ago, I already make the code thinking in multiple players in scene and multiplayer).

    Yeah, I understand that, it happens the opposite to me with visual scripting (at least with unreal, where there was a ton of options that didn't know what they do), I am more comfortable coding, know what I need exactly (most of times xd).

    I haven't been able to test the code you put yet, but I want to do it this weekend, I will need to make a new vehicle, bigger than current one to dock another inside (possible the motorbike inside another four wheel vehicle). I have been working in improve and add some options over the current systems (I will make a quick update progress later about this).

    Also, I started to work on the crash bandicoot style new scene, starting with the waypoint camera, adding a new option for the locked camera (this has allowed me to improve an element in the follow player in straight line option). This scene will allow to work on new elements not only for this style of game but a lot more.


    Regards.
     
    Last edited: Apr 21, 2018
    Wetw0rx and tgamorris76 like this.
  29. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Hi everyone.

    Quick progress update.

    Here a little changelog with most important elements added the last couple of days:
    • Added options to use unity events at the start and stop of aim in any view (for example to activate a mode in a weapon)
    • Added option to set a higher intensity to flashlight then the player aims with it, using the above option
    • Added option to every weapon if the HUD with the info of the weapon is activated or not
    • Added examine object system to inventory pickups, so now, they can be examined before be grabbed or the player can stop to examine them and drop them
    • Added an initial version for a multi axes list to configure different group of actions which are used for every mode in the player according to the current action he is doing, like an axes list only for the weapons, another for movement, powers, menus, examine object, use devices, drive, etc…. Every axes list has the option to configure an action screen showing the current actions that the player can do in that moment and the keys input assigned to every action
    • Added lockers and closets which only open with the interaction button, without need to look at the knob
    • Improved aim assist to detect the current target to look
    • Added locked camera check to vehicles when the player is in a locked camera state, so the camera stays in its locked place while the player drives

    Here the gif related to examine inventory objects before pick them and multi axes list:

    examine inventory object.gif

    It is a little late right now and I need some sleep xd. I will post more gifs of these elements tomorrow.

    Regards.
     
    Last edited: Apr 22, 2018
    Razmot, hopeful, DrOcto and 2 others like this.
  30. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    Just purchased and I have to file a complaint:

    This kit is...

    TOO AWESOME!!! I can’t stop playing with it! I’m not getting anything else done! Just drop in prefabs and... it just works!!! So nice to just drop character prefab into scene and a vehicle or two, and access every area in the scene to test it out! Nice!!!

    Can’t wait for next updates! So much on the list of stuff to be added, every update will be like Xmas with fun stuff to play with!!!

    Great job!!! Keep it up! Very slick!

    One thing I’m stuck on (granted I haven’t dug in too deeply yet, and so may have just not found it), what’s best way or is there a tutorial on adjusting weapon/hand positions? A few models I have work flawlessly, but the ones I want to use in my game (Toon Soldiers by Polygon Blacksmith) by default have weapons all offset. I’m sure it’s a simple adjustment somewhere but haven’t figured it out yet.

    That’s it. Probably just have to scan back through forums.

    —Dan
     
    Mark_01, Wetw0rx, tgamorris76 and 3 others like this.
  31. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Thank you very much for your purchase and very nice feeback Dan.

    Very happy to know you enjoy the asset :) You won't regret it and there is a lot more to come.

    About the weapons, in the doc is explained how to add and configure them (though I need to add new info for new options and systems that have been added, like the pocket system to configure where a weapon is stored to drop it if the player grabs another that goes in the same place, like the right upper leg and whole new systems like the locked camera, the bank inventory, checkpoint, etc...).

    Regards.
     
  32. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Hi everyone.

    Quick update.

    So, I was in the shower (good way to start a post xd), and I started to think about systems for the asset, especially, puzzles.

    And due to I was already thinking about adding a camera to be used as a tool (with the weapon behaviour), a good mechanic to use it would be like the scanner, to show elements in the level that the player can't see usually.

    I think that an smartphone like in silent hill shattered memories was very cool, so I have added that kind of element.

    Even now, while I write this post, I have thought to add also a system to check if the photo has been made looking at an specific object, position and direction (like in that same game), and that will be added as well.

    Anyway, once the smartphone is done, I have added an option to make photos and with that, you need a way to see them and managage them, so I have also added a photo gallery manager in the pause menu. This gallery will be used for a capture system similar to uncharted 4/god of way 4/mario oddisey, to take captures of the game in any moment, moving the camera freely and pausing the action in the game.

    But in resume, in the shower I thought about a puzzle system, starting for a system to configure a group of pieces that the player has to grab and drop using physics (and a modified version of the current grab system, to follow mouse position) in certain positions to activate an element and call a function for any porpuse (open a door, activate an alarm, etc...).

    That puzzle system will allow to rotate objects which needs to be placed in an specific orientation. Also, while the player uses the puzzle, the camera changes to an static position, like for current devices (thought I will add an option to allow to move the camera with a range and rotate it around a point).

    The first puzzle I will make is a balance where the player needs to put some objects in every part, and to know the amount, he will need to take a picture with the smartphone in another room where there are symbols and amounts in the wall, only visible by the smartphone camera, back to the puzzle, check the symbols and place the objects amount correctly to open a safe.

    From there, it will allow to configure a lot more of different puzzles, like connect a electric circuit, pipes, etc...

    Here a changelog with these elements:

    Here some gifs of the smartphone, the gallery manager and the option to show hidden elements in the level:

    smartphone2.gif

    smartphone3.gif

    And here the video:



    I will work on the puzzle system tomorrow.

    Regards.
     
  33. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    It can be a fake augmented reality within the game. ;)
     
    StevenPicard and sr388 like this.
  34. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    Love the phone XD can it have vision modes for scanning in different wavelenghts.
     
    DrOcto and sr388 like this.
  35. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Yeah, it could be another cool aplication.

    Yeah, I want to try unity post proccesing effects to try different filters to configure things live night vision, heat, even add shaders to make corrupted things and similar.

    Another cool element would be to use the smartphone tool as a controller with camera for little vehicles or drones.

    Any suggestion about applications for this tool, feel free to show here ;)

    Regards.
     
  36. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Hi everyone.

    I couldn't resist and I have added the system to check if a photo has been made looking at an specific object, position and direction (like in shattered momeries), to reveal hidden elements. It has been really easy and quick to add.

    So in this case, it has different options, like configure the objects that will be enabled and disabled when the capture is made and the unity events that are triggered. Also, it can be configured the max angle to check if the player is looking correctly at the position configured and if there are objects that need to be visible in screen too. Finally, there is a bip sound to show to the player how close to the position for the capture he is currently.

    So for example, I have made two simple configurations, one where in a table there is key which can't be seen or used where the player needs to look at it by using the smartphone camera and take a picture to "bring the key to this dimension" (why not say like this). Of course, once the capture is taken, the key appears in the table perfectly visible and the other key is not visible anymore with the smartphone.

    In the other one, there is a symbol and if the player takes the capture looking at it, the symbol vanishes and a text appears.

    Of course, you can configure if the objects that are enable are visible or not in the regular world, by just configuring the layer of it.

    Here gifs:

    reveal things.gif

    reveal things2.gif

    And here the video:



    I will be back to vehicles and test the @Wetw0rx code.

    Btw, I have already found a person to make a new 3d character model for the asset and almost select an artist for the animations, so in a matter of weeks, a new looking will replace the current one, with much better animations and more systems.

    Regards.
     
    Wetw0rx, neodotca and Mark_01 like this.
  37. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    well if you are going metroid prime, add the cool little loading bar mechanics, so we can have a scan gameplay where you trade time shooting vs hazard coming at you :D

    Feature creep alert:


     
    Last edited: Apr 25, 2018
    sr388 likes this.
  38. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    I haven't played the metroid prime saga (shame on me, but I never had a game cube/wii/wiiu were play them and I don't like to play these titles with dolphin. I am waiting to see if nintendo finally brings them to switch.....please, I can't wait more to play them xd). Can you tell what is the bar mechanics? The scan system?

    I didn't think bout Fatal frame, ghost could be cool too, to make more survival/horror mechanics/elements. Thanks for the suggestion.

    Regards.
     
  39. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    104
    Hey man,

    I'm having an issue where my GKC_Prefab, using a different 3D model, causes the game to jitter (looks like lots of frames being skipped). Any ideas what could cause this? I'm using Unity 2017.3.1.
     
  40. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    A cause of game jitter in general can be the camera hitting a collider, IIRC.
     
  41. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Does the console shows any message or error? Maybe some issue happened when the character was created in the character creator wizard.

    Other cause, maybe the polycount of the model is high?

    It shouldn't be the cause of a frame drop. The camera collision for third person will be improved soon to fix this (it happens due to the way the camera follow the player).

    Regards.
     
  42. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    this video explain and show the mechanics

    IT also create entry in a database like the pokedex.
    Maybe also add charging weapon? :p
     
    sr388 likes this.
  43. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Oh, I see.

    Yeah, in fact, the scanner of the asset is based in metroid prime (by pressing B by default and holding it while looking to an scanble object to get the info about it). What I didn't added yet (don't know why), was an unity event to configure what happen when an object is scanned, for example, to make an enemy to wake up if you scan it, or to open a door (any you need), so I am going to add it right now. Also, an option for the scanner to lock the camera towards the current object while it is being scanned could be cool too.

    Also, yes, the charging weapon is planned too, for example, with another unity event with differnet callings according to the charging time (make more damage, set a missile as seeker, etc...).

    Regards.
     
    Wetw0rx, Mark_01 and neoshaman like this.
  44. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    104
    Not sure what was causing the problem but it's stopped for now. But now I have some other issues.
    Firstly, I'm getting lot's of warnings (mostly UnityEngine.ParticleEmitter.something is obsolete etc, on import into Unity 2017.3.1 - a couple of errors (TerrainData is missing splat texture 0).
    Secondly I'm having problems with my builds. The keyboard doesn't work at all (can't even press escape for the menu).
    The camera doesn't follow the player - the player moves with the controller (no other buttons work) but the camera stays put. This happens on the demo scenes also.
     
    tgamorris76 likes this.
  45. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    You have to configure the input buttons for the controller, it is under input manger of the GKC prefab. If you want to use the keyboard unplug your controller before you start unity. It's a bug in unity/GKC but dev says he'll patch it for next update.
     
  46. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    If you go back one or 2 pages of this forum you will see all dev said about the bug
     
  47. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    The particle warning are due to using the legacy particle system for just a few effects used since the beginning of the asset. I will change them with the current particle system soon.

    About the issue with the keyboard, it could be some error at the beginning of the game that makes the game to keep working properly (like any error that could happen in the code).

    I can see it this issue with you using teamviewer to check quickly the cause of the problem and fix it. I will contact you by PM.

    Yeah, it could be related with this.

    Regards.
     
    neodotca likes this.
  48. Wetw0rx

    Wetw0rx

    Joined:
    Jun 30, 2017
    Posts:
    125
    Cool. I was thinking it would be cool to unlock certain crafting items or upgrade parts by scanning them. I'm not a fan of tech trees/ leveling systems.
     
    neodotca, sr388 and Brandon_Powell like this.
  49. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    346
    Hurry up cause with unity 2018.1 rc1 it's not warning anymore but actual errors !
     
    neodotca and sr388 like this.
  50. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,890
    Why not both? I was thinking in give both options, so you can make upgrades using a player skills menu with experience/similar or like you said, by scanning elements. Even other options like pick elements in the level which directly unlock new abilities. The more options, the best.

    Yeah, I will change them this weekend.

    Btw, I am also working in a new vehicle controller, the helicopter, to make also the cargo system (in this case, it is a bigger helicopter than regular one). Finally, today I will add a few improvements for player's weapons and the weapons that the player when the game is saved will be stored/loaded too.

    Regards.