Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Space Combat Kit (VSXGames) [RELEASED]

Discussion in 'Works In Progress' started by Billy4184, Jul 14, 2015.

  1. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    3,359
    Rewired can handle throttles on recognized controllers in two ways:
    1. Throttles return a value of 0 when fully disengaged and +1 when fully engaged.
    2. Throttles can be set to return values from -1 to +1 if the option is set.

    See Throttle Calibration Mode.

    To detemine what's happening with your throttle, look at the live value being returned by Rewired for the Action that is mapped to it using Debug Information. If it's returning a 0 - 1 value and the game code is expecting a -1 to 1 value, change the Throttle Calibration Mode setting.
     
    Billy4184 likes this.
  2. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,390
    I have never installed the CH Products software. Just used CH controllers right out of the box. Plugged it and it found the right drivers automatically in Windows and installed those.

    The only thing for the CH Products you would have to map the slide (in flight pedals) to the same thing that twist stick is currently mapped to. Since CH Products and the Warthog are not twist sticks and require pedals for best results.
     
  3. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    147
    Here's an idea that I'll try to implement over the week-end, but maybe someone already has done this and can save me some time: SCK is great for controlling vehicle, but space combat may get up close and personal. That's why I also need to be able to use a first-person controller (for example when after exiting a ship I want to walk across the hangar bay, and enter another ship).

    Looking at the gameAgent script I see that the game agent does not track the agent's (player's) position at all, it merely links to the vehicle the agen is in. This means that the game agent itself does not provide spatial information relating to the contolled player unless you are in a vehicle, and at that time, you track the vehicle's position, not the players. So, to use an FPC, such a controller first must be converted into a vehicle. That should be easy enough by adding the relevant scripts - so has anyone already done this, r even better: is there easy integration for this in SCK that I have overlooked?

    Cheers,
    -ch
     
  4. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    3,921
    You have the right idea, that is the design I had in mind. The vehicle component is a link to anything which can move around, carry modules and damage/get damaged etc.

    The kit is still just a space kit, I have not expanded it yet as a more general vehicle kit. But if I were you, I would start by creating a humanoid 'vehicle', add module mounts in the hands for weapons, create a script for movement that implements the IVehicleController interface, and has health fixtures for damage etc. You could also write a script that stores this humanoid 'vehicle' as only enterable by the player, and which enters it automatically when the player exits the ship.

    If you have specific issues or questions, I would be glad to give explanations and recommendations.
     
  5. Boemak

    Boemak

    Joined:
    May 29, 2013
    Posts:
    26
    Hey,

    I am interested in this asset, does it work in VR? I mean, no wonky stuff with billboards and the like and weird camera tricks?

    If it works fine with my Vive you have a sale. :)
     
  6. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    3,921
    It should work fine. I don't have a Vive or Rift, but I have implemented the UI (including menus and all parts of the HUD) in world space to make it VR compatible.

    The HUD is shown on a separate camera (to avoid any clipping issues for example when using exterior view) but it is easy to remove it and render with only the main camera if you want to.

    If you do purchase and have any problems please contact me through my support email I will gladly help you sort them out.
     
  7. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    147
    Well, there is some wonky billboarding/normal stuff with the Vive, at least with some of the HUD stuff in the demo scene. One I get around looking at that I can say more (Billy: I did see your request for more info, I just didn't get around to look at it. This is with Vive).
     
    Billy4184 likes this.
  8. Boemak

    Boemak

    Joined:
    May 29, 2013
    Posts:
    26
    You got yourself a customer. :)

    Ok, first question: How do I use my Extreme 3d Pro? I don't have rewired, do I need a newer version?

    Edit: So I just bought rewired also, it was on the list anyway. :) Where do I find the templates? I downloaded your asset from the store but I can't seem to locate the rewired templates.

    I tried downloading the Rewired integration package from the link a couple of pages ago but that does not seem to work anymore.
     
    Last edited: Dec 7, 2018
  9. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,390
    The templates are in the Rewired Input Manager. See this URL below for a screen shot ... look for step 10 .. "10. Now let's create a Joystick map. Click "Joystick Maps" in the navigation bar."

    http://guavaman.com/projects/rewired/docs/QuickStart.html

    For the Space Combat Kit - Rewired integration check out this message post and the associated file that is attached.

    https://forum.unity.com/threads/space-combat-kit-vsxgames-released.340962/page-15#post-3917341
     
    Billy4184 likes this.
  10. Boemak

    Boemak

    Joined:
    May 29, 2013
    Posts:
    26
    Yeah that file gives an 500 internal server error, that's the one I tried.
     
  11. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,390
    I get the same error as you. I guess the Space Combat Kit developer will have to fix that link for his Rewired integration.
     
  12. Boemak

    Boemak

    Joined:
    May 29, 2013
    Posts:
    26
    Glad it's not my machine. :) Thanks anyway.
     
  13. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    3,921
    Thanks for purchasing! Sorry about the broken link, here's a dropbox link you can use. My website is a bit of a construction site at the moment as I'm preparing it for marketing of my upcoming game.

    When you can get around to it, I'd appreciate some info on the problem!
     
    Boemak likes this.
  14. brettmoody

    brettmoody

    Joined:
    Jun 25, 2015
    Posts:
    8
    How well does this play with Behavior Designer? Can most behaviors made in Behavior Designer be used by the AI space ships?
     
  15. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    3,921
    At the moment, there's a Behavior Designer integration for the AI provided in the kit.

    The possibilities for creating different behaviors for your game are very flexible. The way input works in the game is that:
    1. The GameAgent script (which represents the player or AI) is separate from the vehicle, and can enter and exit vehicles.
    2. The GameAgent has access to different control scripts for different vehicles (which are stored in child transforms).
    3. When the Game Agent enters a new vehicle, it matches the vehicle type with one of the control scripts, and activates that control script.
    In this way, you can write an AI script (or player input script for that matter) whichever way you like, and simply by making it a control script (i.e. implementing the IVehicleInput interface) and setting the Vehicle Control Class variable to the type of vehicle it is for, the script will be run upon the Game Agent entering the vehicle.

    You still must still create the nodes for Behaviour Designer of course, by writing classes that extend Designer's Action base class for example.
     
  16. Boemak

    Boemak

    Joined:
    May 29, 2013
    Posts:
    26
    I got it working, very awesome. :) Thanks.
     
    Billy4184 likes this.
  17. Boemak

    Boemak

    Joined:
    May 29, 2013
    Posts:
    26
    For anyone who uses this with VR is there anything I need to keep a look out for? Or can I just put in the SteamVR camera rig and hook it up to the ship?
     
  18. brettmoody

    brettmoody

    Joined:
    Jun 25, 2015
    Posts:
    8
    Hi Billy,
    Where can I find the BehaviorDesigner integration? The Unity page is not working.
     
  19. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    3,921
  20. brettmoody

    brettmoody

    Joined:
    Jun 25, 2015
    Posts:
    8
    Hi Billy,

    I am getting the following errors in the BD integration:


    upload_2018-12-8_23-4-46.png
     
  21. brettmoody

    brettmoody

    Joined:
    Jun 25, 2015
    Posts:
    8
    How could I go about fixing these?
     
  22. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    3,921
    I fixed the package so please re-download. Let me know how it goes.
     
  23. Boemak

    Boemak

    Joined:
    May 29, 2013
    Posts:
    26
    How would I go about making my spaceship drift? I've tried reducing the drag but that also makes the main engine less efficient because you have too much momentum for it to really make a difference to your direction, making steering too difficult. The drifting part does work pretty well though.

    Do I need to add extra thrusters or something?
     
  24. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    3,921
    I'm not sure I understood the question. If you want your ship to drift, well it's not going to be too responsive to changes in orientation, because that's the whole point of drifting.

    If you want to drift temporarily, then I suggest binding a key to a change in the rigidbody's drag coefficient.
     
  25. Boemak

    Boemak

    Joined:
    May 29, 2013
    Posts:
    26
    Yeah I am wondering where I can get the throttle input inside the engine script so that I can set the drag lower when there is no trust input.

    I am guessing when there is no input from the joystick, SubsystemTotalPower is zero?

    Edit: They are currentTranslationInputs it seems.

    Edit2: It works, I created a bool "CanDrift" and if the CurrentTranslationInput.z is 0 I set the rigidbody to a lower drag. When you add thrust it goes back to the default.

    Pretty nifty.
     
    Last edited: Dec 9, 2018 at 3:44 PM
    Billy4184 likes this.
  26. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    29
    Hi,

    This asset looks great and I want to buy it. Does it work with Unity 2018.3? Thanks.
     
  27. Boemak

    Boemak

    Joined:
    May 29, 2013
    Posts:
    26
    I am running it on 2018.2.something, if 2018.3 is not that different it will probably be fine.

    Assumptions though. :)
     
    Billy4184 likes this.
  28. ArkadiuszR

    ArkadiuszR

    Joined:
    Jan 21, 2016
    Posts:
    7
    Can i get demo? Even standalone? Demo on assetstore WEBGL not work. :(
     
  29. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    3,921
    I've uploaded for 2018.1, I don't see any reason why it wouldn't be fine in 2018.3. If there's any issue of course I will fix it for you.

    Sorry about that, the asset store demo link should work fine now. Let me know if you have any questions!
     
  30. urancle

    urancle

    Joined:
    Mar 28, 2018
    Posts:
    6
    Short question: (Only about the Radar/HUD part)
    Is it possible to "track" targets only by heading/bearing? I'd need to display a directional course to targets in very far distance (in real world coordinates, but not degree-like WGS84). Unity does not like working with such huge numbers and a reduction is not completely possible since it should be a location-independent feature.
    So could i use this asset somehow to show a target only by its direction, without a GameObject?
     
  31. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    3,921
    Hi, my suggestion would be to use a gameobject, and relocate it relative to the player every frame. Let's say the direction is (0, 0, 1), then you would place the gameobject at <player position> + (0, 0, 1) * 20000 or something like that, and set ignoreTrackingDistance to True on the trackable script. Does that make sense?