Search Unity

[RELEASED] TopDown Engine by More Mountains [new v2.2 : tons of things]

Discussion in 'Assets and Asset Store' started by reuno, Oct 9, 2018.

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @superjakey > No, not with the dialogue zone, it just displays prompts in sequence.
    You'd need something more advanced, like the excellent Dialogue System.
     
    TonyLi likes this.
  2. spvn

    spvn

    Joined:
    Dec 10, 2013
    Posts:
    71
    hey there's an issue with the Health.cs script causing problems with setting my character's material colour to black. During initialisation, it does this:

    Code (CSharp):
    1. if (_renderer != null)
    2.             {
    3.                 if (_renderer.material.HasProperty("_Color"))
    4.                 {
    5.                     _initialColor = _renderer.material.color;
    6.                 }                
    7.             }
    And then in the Revive() function it does this:

    Code (CSharp):
    1. if (_renderer!= null)
    2.             {
    3.                 _renderer.material.color = _initialColor;
    4.             }
    2 questions:

    1. Is there really a need to call renderer.material? Doesn't this immediately instantiate a new copy of the material? This breaks batching, but also when the gameobject is destroyed, the material has to be manually destroyed as well as documented in the Unity docs here. The current code doesn't destroy this material, thus wouldn't this result in memleaks?

    2. I'm using my own custom shader that doesn't have a "_Color" property so it seems like _initialColor maintains its default value of black during init. So when the Revive() function is called (and it's called during the first time a character is spawned), _renderer.material.color gets set to black...

    I'm kind of surprised nobody has encountered these issues yet...

    EDIT: Upon further investigation it seems like other scripts like MMBlink also call renderer.material directly. Doesn't that mean materials will keep getting instantiated unnecessarily, thus breaking batching? IMO these effects of adjusting material colours can be implemented using material property blocks, which won't instantiate new materials and achieve the same effect.
     
    Last edited: Aug 23, 2021
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @spvn > Yes, it's been reported multiple times already, and fixed already for the next release. Don't hesitate to use the support form (https://topdown-engine.moremountains.com/topdown-engine-contact) if you think you've found a bug, or if you need the fix for that, thanks. And yes, material property blocks could have been used here as well, absolutely (the next version of Feel changes that for MMBlink and a few other classes, these changes will come to TDE in time).
     
    Last edited: Aug 23, 2021
  4. codiushmaximush

    codiushmaximush

    Joined:
    Jul 12, 2017
    Posts:
    3
    Hello. Just started working on a project using TD Engine a couple of weeks ago. I've noticed a couple things I wanted to mention and also have been having some trouble with a couple of aspects of the engine.

    PickableWeapon only checks for a HandleWeapon component on the colliding gameObject instead of using findAbility.
    This breaks functionality if using an external gameObject to hold Character Abilities.

    Some components included with Inventory Engine have a bug when viewing the components in the inspector. Field names aren't shown when they are directly beneath a [MMInformation] attribute. I've had to either delete the attributes or use the Debug view in the inspector to see these fields. A specific example is the itemID field in the Item SO

    The current problem I've been tackling is using WeaponAutoAim3D to face a target within it's range. I've got the model facing the target but when I leave the target's range my character's model is stuck facing the aim direction. I dug into the base class for WeaponAutoAim and found that it returns the AimControl to it's previous setting when it loses a target. Seeing this I changed my default Aim Control to SecondaryMovement instead of Script on my WeaponAim3D component. My model's rotation is no longer locked after I move outside of the weapon's range, but the rotation is now permanently offset in the wrong direction.
     
  5. codiushmaximush

    codiushmaximush

    Joined:
    Jul 12, 2017
    Posts:
    3
    Fixed this by setting CharacterOrientation3D's Movement Rotating Model to None instead of the empty gameObject with my actual model nested inside of it.
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
  7. TechWasAMistake

    TechWasAMistake

    Joined:
    Aug 29, 2021
    Posts:
    4
    Is TDE compatible with Pun 2 or mirror or nakama? I know implementation would be up to me, but are their any known game breaking issues? Was TDE designed with the capability to handle more than local users?

    Trying to decide between playmaker and TDE. TDE does everything I'd need out the box, except for non local multiplayer
    Thanks.
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @TechWasAMistake > No, there's nothing preventing you from implementing an entire network layer if you want to, but it'd be a massive task, just like any network layer would be in any game. I would advise against it if you're not a network programmer.
    As for comparing playmaker and TDE, they're two different things entirely, one is a visual scripting solution, and the other one is a top-down action game C# framework.
     
  9. TechWasAMistake

    TechWasAMistake

    Joined:
    Aug 29, 2021
    Posts:
    4
    Thanks for the quick and informative reply.
     
    reuno likes this.
  10. spvn

    spvn

    Joined:
    Dec 10, 2013
    Posts:
    71
    @reuno are there currently any functions as part of TDE to change your cursor from reticle to a regular mouse cursor? For example currently if I open the pause menu or inventory menu, my mouse cursor is still the reticle instead of switching back to a regular cursor.
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
  12. spvn

    spvn

    Joined:
    Dec 10, 2013
    Posts:
    71
    Actually it seems like WeaponAim.cs is trying to unhide the reticle whenever the game is paused but that functionality is bugged. Timescale is set to 0 so FixedUpdate() in WeaponAim3D.cs isn't running, which means HideMousePointer() doesn't get called, and in HideMousePointer() there's this line of code.

    Code (CSharp):
    1. if (GameManager.Instance.Paused)
    2.             {
    3.                 Cursor.visible = true;
    4.                 return;
    5.             }
    Do you want me to submit a bug ticket or something.
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @spvn > Sure, please do, I'll be happy to have a look.
     
  14. hamuralensis

    hamuralensis

    Joined:
    Nov 25, 2020
    Posts:
    4
    Hello.
    I want to move the position of "Scan Radius" in AutoAim 3D.
    I want to place it in the direction of travel, not in the center of the character.
    If it is in the center, it will also Auto Aim the Target behind the character.

    Coloner's "Colonel Assault Rifle" script in the TopDownEngine Demo,
    I changed the value of "DetectionOriginOffset" in "WeaponAutoAim3D",
    But, the Radius position has not changed on the Unity Scene screen.

    Unity Version : 2020.3.13f1
    TopDown Engine : v2.1

    Is there any solution? teach me please.
     
  15. AKAGT17

    AKAGT17

    Joined:
    Sep 8, 2014
    Posts:
    34
    Hi Reuno,

    Just wondered, when I Stand on a moving Platform with any of the 3d characters and then I press the roll/dash function to get off the platform, why is the player's landing position still inheriting a bit of the the moving platform's motion? Is it meant to be like this or is there a way that the player can become independant from the platform? Thanks.
     
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @AKAGT17 > You can pick different Velocity Transfer methods from the top down controller's inspector. No transfer should do what you're after.
    @hamuralensis > DetectionOriginOffset isn't used in the 3D version of AutoAim. I'll fix this for the next release. Don't hesitate to use the support form if you need the fix before that.
     
  17. hamuralensis

    hamuralensis

    Joined:
    Nov 25, 2020
    Posts:
    4
     
    reuno likes this.
  18. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    63
    Hi,
    in 2d game, I have 4 direction animation for a weapon.
    whatever, how can i set player direction to weapon animation? I add "Horizontal & Vertical direction" parameters in weapon animator, and make "Blend tree" for weapon animation attack, but it not working as expect.
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @SarhanSoft > Unfortunately, "it not working as expect" is way too vague to tell you anything. Do the animation parameters update correctly at runtime? If yes, then it's probably just an issue in your animator's setup. If not, try double checking their spelling vs the documentation.
     
  20. SarhanSoft

    SarhanSoft

    Joined:
    Apr 15, 2015
    Posts:
    63
    my game is 2d. top down
    I have 4 direction for character
    and i have 4 direction for weapon animation*
    character and weapon each one has own animator.
    so how can i run animation of weapon with player direction?
    I add "Horizontal & Vertical" parameter in weapon animator look like character animator.
    but it not work. weapon can't read character direction and only run first animation.

    is there any way to implement character direction in weapon animator?
     
  21. Harha-Studios

    Harha-Studios

    Joined:
    Apr 5, 2014
    Posts:
    23
    Hi Reuno,

    I purchased this asset some time ago, and now I'm working on the Engine. I'm making a mobile game. I need one joystick that moves the character. This one I have managed to do. But how can I make another Joystick that will aim and shoot in the direction the other joystick is pointing?

    Just like when you play with keyboard and mouse, but with mobile and two joysticks in the UI. The other is for moving and the other is for aiming and shooting.

    I watched the Top Down Engine: Input, but didn't find a solution yet.
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    Good news everyone, I've just pushed v2.2 of the TopDown Engine to the asset store, it should be available soon for download. It comes with a LOT of performance and quality of life improvements. As usual it also fixes all known bugs to date, I hope you'll like it!

    Full release notes :

    - Adds the CharacterPathfindToMouse ability, which lets you click on the ground and have your character move to this target, as well as a demo of it on the LoftSuspendersMouseDriven demo character
    - Adds the CharacterPersistence ability, which will let you have a character persist with its exact current state when transitioning to a new scene
    - Add AIActionRotateTowardsTarget2D, an action that will let an agent with a CharacterRotation2D ability (set to ForcedRotation:true) rotate to face its target
    - Adds the RunStart and RunStop AIActions, that will let you have AIs start and stop running at will
    - Adds the WeaponAutoAimRadiusCircle component, that lets you automatically draw the range of an auto aim weapon if one is equipped, and adds an example of that in the Colonel demo scene.
    - Adds Burst Mode to weapons, letting you have weapons shoot at uninterruptible periodic intervals. This can be combined with auto or semi auto modes to create advanced firing patterns
    - Adds AIActionFaceTowardsTarget2D, an AI action that lets you change the CharacterOrientation2D's facing direction of an AI, and an example of it in action in the KoalaDungeon demo scene
    - Adds AIDecisionDetectTargetLine3D, a new decision that lets you detect targets using raycasts or boxcasts in line in a 3D context
    - Adds AIActionInvertPatrolDirection, a new AI Action that lets you invert the direction of a target 2D or 3D patrol
    - Adds the CharacterDirectionMarker ability, that lets you orient an object on a Character towards either the aim direction or the movement direction, and two examples of it on the Colonel demo character
    - Adds a CanTargetSelf option to the DetectTargetRadius2D and 3D AI decisions. If true, this AI will be able to target itself (or its children), if false, it'll ignore itself
    - Adds options to CharacterJump3D to prevent jumping on too steep slopes, and to prevent resetting jumps when connecting with too steep slopes
    - Reticles now auto hide on Pause
    - Adds a FeedbackIsProportionalToDamage option to the Health component. False by default, setting it to true will let you pass the damage value to the damage MMFeedbacks, letting you modulate its intensity as damage increases
    - Adds an option (true by default) to AIActionShoot3D to force/prevent a weapon from stopping when exiting state
    - Adds UseSecondaryAxisThresholdToShoot option to the HandleWeapon ability, letting you shoot by just moving your secondary axis around, without the press of a button
    - Adds AbilityPermitted support to the RotateCamera ability, as well as a new InputAuthorized flag, and a SetCameraAngle method to control that ability via another script
    - Adds an option to share Health across characters
    - Adds an optional InventoryTransform to CharacterInventory, letting you assign a different transform to all inventories attached to a character, useful to have a specific drop target
    - Adds an option for Health feedbacks to be proportional to damage
    - WeaponAutoAim3D now supports DetectionOriginOffset
    - Adds an option to Health to be completely immune to damage
    - Adds options to WeaponAmmo to empty a magazine back in an inventory on save and on weapon change
    - Improves the way the CharacterMovement handles acceleration/deceleration
    - WeaponAim3D now computes CurrentAngleAbsolute too
    - DamageOnTouch will now force isTrigger:true on its associated collider
    - Combo weapons are now compatible with the WeaponModel class
    - The DetectTargetRadius3D AI decision now uses OverlapSphereNonAlloc
    - Adds an extra safety check to ProximityManager
    - TopDownController3D now doesn't use OnControllerColliderHit anymore to prevent it from generating garbage
    - The Health and Bomb classes now use property blocks when dealing with the renderer's material
    - Adds options to randomize the frequency of AI actions and decisions to help balance them across frames
    - Improves AmmoDisplay's performance
    - Improves DamageOnTouch init performance
    - Improves WeaponLaserSight's performance
    - WeaponAutoAim3D now uses OverlapSphereNonAlloc
    - Improves CharacterPathfinder3D's performance & allocations
    - Adds options to disable animator warnings, and skip animator parameters sanity checks, true by default, for increased performance
    - Removes unused PerfectImpact from DamageOnTouch (use MMPreventPassingThrough instead)
    - Adds an extra cooldown check to CharacterDash2D/3D to prevent bypassing the cooldown when calling DashStart from outside classes
    - TopDownController's cardinal obstacle checks are now optional (and turned on by default for grid movement)
    - Improves TopDownController3D's performance, slope management and GC output
    - Fixes a typo in a comment/tooltip in the TopDownController class
    - Fixes a wrongly looping smoke particle on the LoftHandgunWithAmmo prefab
    - Fixes a bug that would cause the LevelSelector to ignore LevelManager settings when in reload level mode
    - Removes a useless pooler component on the Colonel's hitscan weapon
    - FIxes CharacterPause ability permissions
    - Fixes CharacterAbility generating some GC when dealing with blocking condition states
    - Fixes a bug that would prevent putting swap abilities on separate nodes
    - Fixes PickableWeapon not using CharacterHandleWeapon.CanPickupWeapons
    - Fixes a bug that would cause bouncy projectiles to not change direction when used in conjunction with MMPreventPassingThrough
    - Fixes a few aim/flip bugs on HitscanWeapon
    - Fixes missing AbilityAuthorized checks on AbilityNodeSwap, ButtonActivation, DirectionMarker, FallDownHoldes2D, GridMovement, Orientation, Swap and TimeControl abilities
    - Fixes a bug that could cause non magazine based weapons to get stuck when receiving reload requests
    - Updates the jump ability default parameter values
    - The camera in the Loft3D demo scene is now rotated by 45° on its y axis
    - Removes a few unused properties in Character and AIDecisionDetectTargetRadius3D
    - PostProcessVolumes are now on separate objects in most demo scenes
    - The Loft3D demo character won't start with a pre-filled inventory anymore
    - Removes unused properties in AIActionMoveAwayFromTarget2D and 3D
    - Removes useless references to vibrations in the Health class
    - Removes a useless line in FinishLevel
    - The Koala jump animation now also moves its weapon attachment
    - Removes unused terrain assets in the Loft3D demo scene
    - Disables post processing on both the Minimal2D and MinimalScene3D demo scenes
    - Renames the Minimal2D demo scene to MinimalScene2D for consistency
    - Welcome Window won't auto open on install anymore
    - Updates CustomRuleTileMenu
    - Turns the RunInBackground setting off in PlayerSettings
     
    zackarhino likes this.
  24. heisarzola

    heisarzola

    Joined:
    Oct 6, 2014
    Posts:
    8
    Hello, if it isn't much trouble I would like some, I guess you could call it guidance as to how to use your asset.

    Specifically when it comes to inheritance and overriding to add your own functionality, so this should also apply for something like Corgi Engine as well.

    The gist of it is that prior to acquiring any of your assets, I already had a framework of my own. So I already had in place systems for audio management, input management, etc. Not all areas are equally robust, but it's fair to say there was at least something for almost everything.

    So when it came to inheriting and re-writing parts existing assets, it was almost instantaneous.

    For example, CharacterAbilities come with AudioClip fields for you to just drag and drop assets to play on specific events, like onStart, during, onEnd, which makes total sense.

    So me, that has a custom audio system is like "alright, fair enough, I'll just hide these audio clips on an editor script, add what I use for audio, and override via inheritance this part of the code" which in this case is a database picker:

    upload_2021-9-8_20-24-19.png

    And so far so good, I now have my own class for that inherits from CharacterAbility with my added custom audio functionality, let's call this class MyCharacterAbility.

    The problem comes when I'm interested on keeping one of your custom classes that inherit from the original CharacterAbility, specifically things like CharacterMovement. This script, is clearly meant to synergize very nicely with the rest of the engine, it's well thought out, and already accounts for many things from input handling to physics, and in a sense, it's part of the core scripts that I mainly purchased the collection for. So if later down the line, a script like this is updated, be it to handle a reported edge case or something, well that's only beneficial to me as someone took care of an issue before I had to.

    So it would make sense for me to want to inherit from CharacterMovement, probably add some overrides to plug my custom input system and whatnot, and be on my way to the next thing. But the problem is that CharacterMovement inherits from CharacterAbility, and not MyCharacterAbility. So to my eyes, and this is what I need help with as I might be horribly misunderstanding my best course of action, but I think I'm met with the dilemma that I might need to pick one of the following:

    a) Edit CharacterMovement to inherit instead from MyCharacterAbility, and do the same for any existing core engine abilities that I'm interested in using. Which itself brings trouble the moment a new engine update comes and resets the script, as well as that it might be needed to edit the MM assembly files to reference my own assemblies, or outright delete them (which for the sake of argument, let's just say doing either of these last two is doable, forgetting about how hard it actually could be to handle).
    b) Simply inherit CharacterMovement, which does without the massive problems the previous approach would have, at the new expense that I basically no longer have the "centralized" benefit of inheriting from MyCharacterAbility, handling the audio all in one script. Where there would still be the possibility of centralizing the code via a static method referenced on each override, but would still have to be referenced on each script individually regardless, on top of having to re add my custom engine fields for audio each time as well,.
    c) Copy pasting the entirety of CharacterMovement, renaming it and having it inherit MyCharacterAbility, and use this new separate ability as the parent for MyCharacterMovement. Where of course the problem would be that I'd need to either make a script that tracks updates on the asset, to replace my separate copy of the original script, or take note when updating what scripts have changed, and re-copy paste it all again by hand.

    To be honest, assuming it's all fairly stable by now and update of those specific scripts is unlikely to change much, the last approach doesn't seem that outrageous and is the thing I'm mostly inclined to follow. But if I do it, I’d be accepting this convoluted way, would be the way to go in case I wanted to inject custom code of more complex or parts of the engine, which might have these same issues of "okay, where do I add the calls to my own systems", and end up in a similar cycle.

    If there was a fairly simple thing I overlooked and I grossly overcomplicated this, then it'll end at me looking like a fool, but at least I'd be a fool with an answer, and that's the only reason I'm asking here, so I thank you in advance for your reply.
     
    Last edited: Sep 9, 2021
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @heisarzola > All 3 options are valid routes, and you didn't overlook a super simple alternative, it's a good question :)

    I personnally wouldn't pick option C, keeping track of changes could become complex, and duplicating code like that is something I try to avoid.
    B seems to not do what you're after (which is having changes to the base class), so I'd ignore that option
    A would work of course, but for one change on the base class you've now modified all abilities, that's a lot of changed files

    I think the way I'd go would be either :
    - modify CharacterAbility directly (if possible) to add your functionality to it. That's one changed file, and relatively easy to keep track of. When an update comes, you merge that change with the new stuff using your version control software, and as it's new functionality, and as that class specifically doesn't change much (I try to be nice and not to break everything), it's a pretty safe option
    - avoid modifying any class, and implement your new functionality in additional components. Not always an option of course

    Eventually, all of these are valid options, and you should go with the one you're the most comfortable with. I hope this will answer your question!
     
  26. spvn

    spvn

    Joined:
    Dec 10, 2013
    Posts:
    71
    Hey any idea why 2 pools are being created for one weapon? After tracing the code a little, it's something to do with setting an object in "AutoEquipWeaponOnStart" in CharacterInventory, while also having that weapon's "Auto Equip Mode" be "Auto Equip". Those 2 things somehow conflict and cause 2 pools to initialise. Strangely, Instantiate is being called twice (hence why 2 Awakes are being called on the pool) but only one weapon ends up in the scene...

    Strangely this does not seem to be a problem in the Loft3D scene but I can't figure out why... It seems like because after EquipWeapon() is called once, the weapon got removed from the inventory so when a second equip request is sent, it gets ignored. However in my own scene the weapon still seems to be in the inventory after being equipped, so the second equip request goes through and a second pool is created...
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @spvn > There's an option on projectile weapons to mutualize pools, but I'm not sure it's related. If you think you've found a bug, please use the support form to report it, and provide context info + repro steps, thanks.
     
  28. spvn

    spvn

    Joined:
    Dec 10, 2013
    Posts:
    71
    This is related to your inventory system, but could you clarify what's the difference between "Target Inventory Name" and "Target Equipment Inventory Name" in InventoryWeapon? I currently have them set to the same name but realised they're different for the Loft3D demo. I have no idea why there're 2 different variables and I can't find anything about TargetEquipmentInventoryName on the documentation.
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @spvn > Sure, as the documentation (https://topdown-engine-docs.moremou..._1_1_inventory_engine_1_1_inventory_item.html), inspector tooltips or comments in the class itself will show :
    - TargetInventoryName : the name of the inventory into which this item will be stored
    - TargetEquipmentInventoryName : If this item is equippable, you can set here its target inventory name (for example ArmorInventory). Of course you'll need an inventory with a matching name in your scene. You can also specify a sound to play when this item is equipped. If you don't, a default sound will be played.

    Again, please use the support form (https://topdown-engine.moremountains.com/topdown-engine-contact) for support questions or bug reports, thank you!
     
  30. waheyluggage

    waheyluggage

    Joined:
    Aug 22, 2015
    Posts:
    14
    Hi Reuno. Great asset and I'm just getting to grips with it and Unity. Quick question, I'm trying to get my character to animate when I shoot, I just need to set a bool in the character animator. The weapon is set to be equipped when the level starts and works fine until I try to make the character animate.

    I've tried adding my player character to the animator list in the Projectile Weapon and then set "Single Use Animation Parameter" to my shoot bool. I just get this error though...

    "UnassignedReferenceException: The variable Animators of ProjectileWeapon has not been assigned.
    You probably need to assign the Animators variable of the ProjectileWeapon script in the inspector." and the weapon doesn't fire.

    It's set as far I can tell..

    upload_2021-9-12_23-11-16.png

    So, steps I take...

    1) Place my weapon prefab into the scene to edit it.
    2) Create an Animator and click the little circle and select my PlayerModel.
    3) Add "Shoot_b" to the Single Use Animation Parameter.
    4) Save prefab back again.
    5) Delete weapon from scene.
    6) Hit Play.

    Odd things, I've got it to work once but wasn't sure what I'd done. I think as soon as I saved it back to a prefab it went wrong - I might even have edited it while it was running. If I close Unity and reopen it then the Element 0 in the Animators sometimes ends up set to nothing. At this point the camera and character doesn't work properly until I remove all the animators from the weapon.

    This is probably something to do with my lack of Unity knowledge so apologies for that.

    Thanks!
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
  32. waheyluggage

    waheyluggage

    Joined:
    Aug 22, 2015
    Posts:
    14
    Thanks for the quick reply! I'll check the Sword demo - it's not so much the weapon animation that I'm looking to do though but the character animation when he shoots, like if he fires a gun his shoulders shake etc. I looked for an "Attacking" animation parameter for the character but couldn't find one so thought I could just add the character's animator to the weapon animator and send my animation parameter that way.

    Thanks again!
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @waheyluggage > As explained in my message above, and in the docs I pointed at, the "character animation when he shoots" is defined by the weapon. Again, no need to add the character's animator to the weapon animator, it can't be done anyway, both get instantiated :)
     
  34. waheyluggage

    waheyluggage

    Joined:
    Aug 22, 2015
    Posts:
    14
    Ah, right. Yeah, that just worked. Doh, sorry about that. Thanks again.
     
    reuno likes this.
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @waheyluggage > I'm glad it's working now, thanks for letting me know!
     
  36. waheyluggage

    waheyluggage

    Joined:
    Aug 22, 2015
    Posts:
    14
    Hi Reuno, been making some decent progress. I've ran into an issue when I tried adding a grenade to the game. I've got it mostly working except the effect I'm trying to trigger when the grenade 'bullet' dies. I'm a bit unclear on the best practice for the bullet GameObject.

    I have my hierarchy like...

    upload_2021-9-20_0-50-22.png

    The Health component is on the "GrenadeBullet" and under Bindings I've pointed it at GrenadeMesh. I then set the Death "MM Feedbacks" to use the GrenadeExplosionFeedback. This works and I see the ExplosionFeedback (but not all the particles attached for some reason).

    Annoyingly though I also see it when the bullet spawns (and with all the particles) after the first one. I've checked and it's not the "Death MM Feedbacks" triggering. I guess it's that it's added to the Bullet hierarchy and is autoplaying somehow? I've tried a few things, If I set the Feedback to inactive then I don't see it at all. If I don't have it in the hierarchy but drag a prefab of the effect on, it doesn't work. The feedback itself doesn't have auto play set on.

    I've recreated the issue in the Loft3D demo by trying to get the explosion effect that's on the Car near the start to happen on the 'death' of each handgun bullet. The Handgun bullet looks like this..

    upload_2021-9-20_1-12-25.png

    And the Health component for the handgun bullet looks like this...

    upload_2021-9-20_1-11-45.png

    I could maybe work around it by having 2 feedbacks, one that is the explosion and that's deactivated, then another that activates it and plays it. Or have I got confused with how something is supposed to 'die'?

    Thanks!
     
    Last edited: Sep 20, 2021
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @waheyluggage > open the LoftHandgunBullet prefab
    - drag a LoftExplosionFeedback prefab into it
    - position it at 0,0,0
    - on the LoftHandgunBullet object's DamageOnTouch component, drag the LoftExplosionFeedback into the DamageOnTouch's HitDamageableFeedback and HitNonDamageableFeedback slots
    - press play, pickup the handgun, shoot at stuff with your now very impressive handgun.
     
  38. waheyluggage

    waheyluggage

    Joined:
    Aug 22, 2015
    Posts:
    14
    Hi Reuno, thanks for the reply speedy reply again.

    I tried that but I get similar results to using the Death feedback. The first few shots behave correctly, but when it reuses one from the pool the feedback is triggered as soon as the bullet spawns. (I think that's what's happening).
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @waheyluggage > open the LoftExplosion particle system prefab, uncheck "PlayOnAwake" in its particle system component.
     
  40. waheyluggage

    waheyluggage

    Joined:
    Aug 22, 2015
    Posts:
    14
    Ah, that got it, it was indeed the particle systems having their PlayOnAwake set to true. Thanks!
     
    reuno likes this.
  41. spvn

    spvn

    Joined:
    Dec 10, 2013
    Posts:
    71
    Any idea why there's a slight gap between my character controller and the ground? My enemy character is also floating slightly above the ground like that.

    upload_2021-9-24_15-54-1.png
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @spvn > Sure, that's your character controller's skin width. Adjust your model's position accordingly so that it appears connected to the ground.
     
  43. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,378
    Is there any tutorial or recommended way to make this multiplayer across the internet? Also how do I turn on the mobile controls? Or do they only appear when you build for mobile?
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @radiantboy > No, there is no such tutorial. But a network layer could be added to the engine like in any other project, there wouldn't be much that would be specific to the engine in that regard.

    On a side note, if you've never done any network programming, I'd advise against it. It's a LOT of work, which people usually underestimate. If that's the case, I'd suggest starting with smaller projects, to get a better idea of the complexity of that field.

    As for mobile input, it's all explained in the docs at https://topdown-engine-docs.moremountains.com/input.html#how-does-platform-detection-work
     
    Last edited: Sep 28, 2021
    radiantboy likes this.
  45. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,378
    Hi, Im using the LoftTie prefab, when he walks over something at a certain height he jumps in the air automatically, without a button press, how do I turn this off?
    Also if you just tap jump a few times fast he is stuck in a jumping loop forever.
     
    Last edited: Oct 1, 2021
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @radiantboy > Once again, please use the support form for support questions like that, thank you. I'd also need more info about what exactly that "something" is.
     
  47. hamuralensis

    hamuralensis

    Joined:
    Nov 25, 2020
    Posts:
    4
    Herro.
    I want to manually switch to the next closest target using Auto Aim3D.
    The current specifications automatically switch to the closest target, I can't keep locking on the same target.
    Projectiles shot with Laser sight and AutoAim3D do not lock on the target's Y-axis and can only move and fire on the same horizon.
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,356
    @hamuralensis > Right now there's no such feature, you'd have to implement it. It'd be very easy to do so with what's already there. You'd just have to prevent regular scans (that's handled by the ScanIfNeeded method), and instead have these scans bound to some input.
     
  49. dataEcto

    dataEcto

    Joined:
    Feb 21, 2018
    Posts:
    11
    One thing I'm wondering:

    With MMPath, you can place a delay that turns the AI around and stops it in place before it heads to the next point.

    This is all well and good; I'm wondering if there's a way to stop the AI before it changes direction.

    Here's a gif reference of the default behavior (Let me know if it doesn't work)

    https://gifyu.com/image/eMv6

    If you can, I'd love any tips on where in the MMPath and/or AIActionMovePatrol2D scripts I could modify the behavior. Thanks!
     
  50. dataEcto

    dataEcto

    Joined:
    Feb 21, 2018
    Posts:
    11
    *oops, I forgot I can choose upload a file to share gifs. defaultAIBehavior.gif
     
unityunity