Search Unity

Space Combat Kit (VSXGames) [RELEASED]

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

  1. juris3d_unity

    juris3d_unity

    Joined:
    Nov 14, 2017
    Posts:
    53
  2. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    juris3d_unity likes this.
  3. TSHIBA3D

    TSHIBA3D

    Joined:
    Apr 7, 2018
    Posts:
    61
    how i do little when i take an invector-icon directly a picture is displayed on the screen, when i take a second another picture is still showing, i followed this tutorial https://www.youtube.com / watch? v = CHUOprBocoY
    trying to write the script I had two error messages

    The first: Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/Generic/vPickupItem.cs(13,10): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
    Capture d’écran 25-04-2019 02.42.37.png

    the second one: Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/Generic/vPickupItem.cs(36,5): error CS0118: `UnityEngine.GameObject' is a `type' but a `variable' was expected
    Capture d’écran 25-04-2019 02.44.05.png

    please help me how can i do anything to display an image of i contact an invector-icon?
     
  4. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    I think you have the wrong thread! This is for the Space Combat Kit.
     
  5. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Here you go!

    WebGL Demo

    capshipscreenshot.png
    capshipscreenshot0.png
    capshipscreenshot1.png

    PS there's still a few bugs to fix and polish to apply.
     
  6. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    366
    That is looking pretty nice, Billy! I cannot wait to get my hands on the next version.
    Stay busy!

    Mark
     
    Billy4184 and JFI66 like this.
  7. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    If you think that looks nice, wait until you see the codebase/workflow ;)
     
    MMccathron, Neviah and JFI66 like this.
  8. Drimacus

    Drimacus

    Joined:
    Jun 11, 2018
    Posts:
    2
    Is somewhere tutorial how to set up enemy turret? I have HeavyTurret/GimballedGun prefab but they are missing a lot of references and I don't know how to set it up correctly. And they look weird on the scene
     

    Attached Files:

  9. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    173
    It uses inertial physics. It's right ? Can you add up/down forces ?
    Can it be modified to have a NO inertial physics like Descent ?
     
  10. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    22
    Capital demo looks very impressive - hope you realize that people will be now be even more impatient to get the update :)
     
    frankadimcosta likes this.
  11. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    I'll send you a package with a turret set up.

    It uses Unity physics/rigidbody. Sorry forgot to add to the instructions, Space is up and Ctrl is down.

    You might be able to use very high drag and high forces to achieve very low inertia. For really 0 inertia, you'd have to create your own physics system.

    Pretty much the only thing that relied on a rigidbody was the lead target calculation, but that's why I added the PhysicsInfo class to the Trackable script, so the information was independent of the rigidbody.

    Looking forward to getting it out for you guys soon!
     
    MMccathron, frankadimcosta and JFI66 like this.
  12. TSHIBA3D

    TSHIBA3D

    Joined:
    Apr 7, 2018
    Posts:
    61

    how can i do when my character collides with an invector-icon directly an image appears on my screen
     
  13. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Please contact Invector for support related to their products. This does not appear to have anything to do with the Space Combat Kit whatsoever. I cannot help you with issues related to products that are not mine.
     
  14. TSHIBA3D

    TSHIBA3D

    Joined:
    Apr 7, 2018
    Posts:
    61
    ok thank you I confused
     
    rickytsmith and Billy4184 like this.
  15. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    @Drimacus

    Hey everyone, here's a quick unitypackage to show you how to use the turret.

    The TestTurret script has two options, one for controlling it yourself, and another for automatically tracking and firing at the target, which you'd use for automatic turrets or AI-controlled turrets. Take a look in the code to see how to call the right methods on the Gimbal Controller, which controls the turret.

    upload_2019-4-28_11-39-52.png

    I have included a copy of the ProjectileWeapon script with a small modification to remove dependency on the module mount and vehicle. The next update will make it very easy to use components individually without having to modify code.

    Let me know if you have any questions.
     

    Attached Files:

  16. CobraStudios

    CobraStudios

    Joined:
    Feb 6, 2018
    Posts:
    1
    Will there come a Tutorial or Update on how to go from Enter/Exit vehicle with this??
     
  17. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Yes there will, when (or soon after) the update arrives that includes a first person character.
     
    Neviah likes this.
  18. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    22
    Hi Billy - In the Turret test I see that the modified projectile weapon no longer has the IGunModule interface which means that the test does not work on current versions .....or have I missed something ?
     
  19. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    173
    I got this error:
    NullReferenceException: Object reference not set to an instance of an object
    VSX.UniversalVehicleCombat.ProjectileWeapon.Update () (at Assets/SpaceCombatKit/Scripts/UniversalVehicleCombat/Weapons/WeaponControllers/ProjectileWeapon.cs:346)

    Maybe turret is missing a Power Module ?
     
  20. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    The ProjectileWeapon class does indeed implement the IGunModule interface, check line 16.

    The turret test was made in the last uploaded version (1.21) so nothing is different except for the modification I made to check that the module mount reference wasn't null before using it.

    Did you import the modified ProjectileWeapon.cs file? This is the reason why I made the modification.
     
  21. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    173
     
  22. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    173
    I imported SCK after the turret test asset. I think the reverse order is a better way.
     
    Billy4184 likes this.
  23. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    22
    You are quite right it does ! - the errors were due to some other changes I had made in the IGunModule interface.
    Works well - always tricky getting the correct coefficient values.

    Just as a matter of interest - I have a waypoint system that uses trigger colliders rather than distance to detect arrival. This is mainly to make use of the OnTriggerEnter event to set off a chain of other events.
    I found that the ai ships would weave about a lot and have trouble arriving at a way point - the obstacle avoidance was detecting the waypoints as obstacles. I always thought that trigger colliders had no actual physical collision and would not be detected by the raycast but it seems they are. Something new I have learnt. Easy fix is to assign the waypoints to a new user layer and then add a mask to the raycast.
    Modified Tick() method in ObstacleAvoidanceBehaviour.cs
    Code (csharp):
    1.  
    2. public void Tick()
    3.         {
    4.             // Do collision avoidance
    5.             LayerMask mask = LayerMask.GetMask("Default");
    6.             float obstacleScanDistance = blackboard.Vehicle.CachedRigidbody.velocity.magnitude * minMaxCollisionReactionTime.y;
    7.  
    8.             RaycastHit[] hits = Physics.SphereCastAll(blackboard.Vehicle.CachedTransform.position, sphereCastRadius,
    9.   blackboard.Vehicle.CachedRigidbody.velocity.normalized, obstacleScanDistance,mask);
    10.  
    11.             UpdateObstacleData(hits);
    12.         }
    13.  
     
    Billy4184 likes this.
  24. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Great point there, I will make a note to be able to set the layer mask in the inspector.
     
    MMccathron likes this.
  25. JFI66

    JFI66

    Joined:
    Aug 25, 2015
    Posts:
    28
    The space combat kit is on sale, don't wait ....
     
    juris3d_unity and Billy4184 like this.
  26. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    22
    This asset is so underpriced anyway seems a shame to put it on sale. £20 is ridiculously good value. If anyone hasn't bought this yet don't hesitate - it is worth 10x the price.
     
    juris3d_unity, Billy4184 and JFI66 like this.
  27. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Thanks for the kind words!

    Yes, the Space Combat Kit is currently 50% off, so grab it now while it's hot!

    BIG UPDATE almost ready, with first person controller, capital ships and more!
     
  28. juris3d_unity

    juris3d_unity

    Joined:
    Nov 14, 2017
    Posts:
    53
    AwesomeVol3.jpg The Day is TODAY! Hehe, I finally bought this Kit Vol3 !! LEt me say, this is one Monster-Mother-Of-Assets, don't you agree?? :D Many, many Thankyous to Author - for his giant work, many talents, dedication!
    EDIT: haha, i posted here by accident, meant to other thread... But, if it is not un-ethical, should it stay? :) I can delete if unappropritate
     
    Last edited: May 3, 2019
  29. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    119
    Getting errors after importing the asset into a fresh project. Windows 10 with Unity 2018.3.8f1.

    Code (csharp):
    1.  
    2. Assets/SpaceCombatKit/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs(6,34): error CS0104: `MinAttribute' is an ambiguous reference between `UnityEngine.MinAttribute' and `UnityEngine.PostProcessing.MinAttribute'
    3.  
    4. Assets/SpaceCombatKit/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs(11,13): error CS0104: `MinAttribute' is an ambiguous reference between `UnityEngine.MinAttribute' and `UnityEngine.PostProcessing.MinAttribute'
    5.  
    6. Assets/SpaceCombatKit/PostProcessing/Editor/PropertyDrawers/MinDrawer.cs(11,39): error CS0104: `MinAttribute' is an ambiguous reference between `UnityEngine.MinAttribute' and `UnityEngine.PostProcessing.MinAttribute'
    7.  
    Sorry, I found the fix for this problem. https://forum.unity.com/threads/space-combat-kit-vsxgames-released.340962/page-24#post-4386178
     
    Last edited: May 1, 2019
    Billy4184 likes this.
  30. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    First person character demo level coming together, it's going to be loads of fun!

    Screenshot.png
     
  31. juris3d_unity

    juris3d_unity

    Joined:
    Nov 14, 2017
    Posts:
    53
    Coolz ! :D
     
    MMccathron likes this.
  32. juris3d_unity

    juris3d_unity

    Joined:
    Nov 14, 2017
    Posts:
    53
    @billy, should i delete my post about wrong asset? :)
     
  33. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    I'd prefer to keep the thread focused on the SCK from here on, but you don't have to delete that post - after all it's relevant to users of my kit.
     
    MMccathron and frankadimcosta like this.
  34. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Good news, the same component will now do 2D and 3D radars!

    Screenshot.png

    Space Combat Kit is currently at 50% off, grab it now!
     
  35. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Laser turrets with cool effects on the way!

    Screenshot.png

    Space Combat Kit is currently at 50% off, grab it now!
     
  36. LarsH673

    LarsH673

    Joined:
    Mar 7, 2015
    Posts:
    13
    Hi Billy wath do you think about creating a Discord Server for you nice package ? its easier for most people to help each other :)
     
    juris3d_unity likes this.
  37. juris3d_unity

    juris3d_unity

    Joined:
    Nov 14, 2017
    Posts:
    53
    As @LarsH673 said, I agree - Discord place could be awesome.
     
  38. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
  39. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    119
  40. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    22
    The First person stuff looks very cool - I wonder how the transition will be made from ship to first person ? Is there a way to land perhaps ? very much looking forwards to this update !
     
  41. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    The character and ship are both 'vehicles'. The player exists as a bodyless 'game agent' which can transition between vehicles. When the player lands the ship, once the landing animation is finished, the player transfers to the character.

    The system also keeps track of the hierarchy of vehicles that have been entered, such that it's always clear which vehicle the player will exit into when they exit a vehicle.
     
  42. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
  43. FusionSticc

    FusionSticc

    Joined:
    Mar 16, 2014
    Posts:
    49
    How's the progress coming along (no rush of course, just gauging)?
     
  44. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    It'll come out end of this week, the full update :)
     
  45. FusionSticc

    FusionSticc

    Joined:
    Mar 16, 2014
    Posts:
    49
    Awesome! Can't wait!
     
    JFI66 likes this.
  46. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    704
    Quick question, before the big update drowns me out :) --

    If I start a Scene without focusing a player (by having none set as FocusOnStart, and no Default vehicle -- I have a custom FPS Controller for my VR rig) - what is the easiest way to Focus my Player and have the vehicle cam Switch on?

    Obviously, I can't simply Switch on the vehicle cam, as no Player is focused, and all the GameAgent calls abend without a focused Player.

    Thanks,
    -ch
     
  47. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    I really recommend the update in this case, because one of the main things it focuses on is getting rid of these kind of dependencies.

    Basically, if there is no focused game agent, there shouldn't be errors, but things obviously won't work. You can easily make a Game Agent focused by calling SetNewFocusedGameAgent method on the GameAgentManager script. This will trigger the vehicle camera and everything else to start working.

    In the update, the GameAgentManager is entirely optional. Every script has its own dependencies and a way to set those dependencies, which can be set in the inspector or with any 'manager' script of your own.
     
  48. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    704
    Thanks Billy!
     
    Billy4184 likes this.
  49. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    173
    Billy, a question: the capital ship script will be usable in old version ?
     
  50. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    If you really need it I can send you a control script for the old version, but everything in the capital ship demo that's coming with the update will be using the updated way of doing things.
     
    frankadimcosta likes this.