Doxia Studio Posted November 23, 2021 Report Posted November 23, 2021 Hello! Is it possible to edit how the hit detection on combat works? Is somewhere in the Unity scripts? I need to readjust a few things because I'm doing an ARPG isometric game and I've changed the projectiles to non target too. Quote
Martin (Dragonsan) Posted November 23, 2021 Report Posted November 23, 2021 Hi, the projectile has various options, so you can move it from caster to target, but with ARPG is not an option or from the caster in a direction where the player is rotated, within a cone, on defined distance, and with configured speed. All of these are server-side. You should be able to set all of them in the Atavism Standalone Editor. Let me know if you are missing any settings, and I'll try to give you more information about where the specific code resides. Quote
Doxia Studio Posted November 23, 2021 Author Report Posted November 23, 2021 10 minutes ago, Martin (Dragonsan) said: Hi, the projectile has various options, so you can move it from caster to target, but with ARPG is not an option or from the caster in a direction where the player is rotated, within a cone, on defined distance, and with configured speed. All of these are server-side. You should be able to set all of them in the Atavism Standalone Editor. Let me know if you are missing any settings, and I'll try to give you more information about where the specific code resides. yes I have everything working, from editor and unity scripts. Edited a bit the Projectile Script. The only missing thing we need to fix is the hit box. because we are making an isometric style and with sprites, we need to edit how the hit is calculated to use physics. For now, because we are launching the first closed beta this friday, we rolled back to how it was, with key movement and target skills. After closed beta with more time I will see this topic with you and if it is possible in more detail. Thank you for all the help. Quote
Martin (Dragonsan) Posted November 23, 2021 Report Posted November 23, 2021 I understand, but I think there is no difference in invoking hit between full 3d and isometric view? Physics is only client-side. The server is invoking hit based on the parameters I mentioned, so projectile speed and distance. In Coord Projectile component you have hit a game object that is instantiating when the projectile will reach the defined target, so I believe you would have to add physics there, and on impact just instantiate the hit game object on the client, while on the server you can define how many targets it can hit, like how many random targets, or first targets. You can also have another coord effect for damage effect, so whenever target will be hit by the effect, then it will instantiate coord effect with defined VFX/SFX. Quote
Doxia Studio Posted November 23, 2021 Author Report Posted November 23, 2021 To explain it better what I did. I took the CoordProjectileEffect class and edited to non target, where instead of having a mob targeted it cast a projectile to the mouse position. When casted, it emits a Game Object (Particle Object) where I have it moving until the mouse position and on this game object I have the physics, where if it hits the target do the hit effect. From client side it works. But sometimes, it detects the hit with my class on client side but not on server side because from when the spell was casted and until the hit, the target destination moved. From what you said I had an idea. on my side, instead of just emitting a hit game object, that game object could have the skill area aoe. instead of just being a VFX GO it could be a Coord Effect. right? About the isometric and 3d is different, we need to think more in 2D rather on 3D. the hit box works differently. I don't know if i can share here images but I'll post a link. https://imgur.com/epYe7CR From that image for example, the pink monster, has to get hit by a large hit box, not just comparing with the root position. we need to think like the creature is printed on the ground, changing the areas of hit coord on X and Z. But I will try that idea you gave me and let you know Quote
Doxia Studio Posted November 23, 2021 Author Report Posted November 23, 2021 Ok so how I was thinking does not work 😅 I need to call from script an effect on server side. Like it does when I press the hotkey "1" it does the skill on the first slot of actionbar. i tried to figure out over the script on action bar but without success. Quote
Martin (Dragonsan) Posted November 24, 2021 Report Posted November 24, 2021 16 hours ago, Doxia Studio said: To explain it better what I did. I took the CoordProjectileEffect class and edited to non target, where instead of having a mob targeted it cast a projectile to the mouse position. When casted, it emits a Game Object (Particle Object) where I have it moving until the mouse position and on this game object I have the physics, where if it hits the target do the hit effect. From client side it works. But sometimes, it detects the hit with my class on client side but not on server side because from when the spell was casted and until the hit, the target destination moved. From what you said I had an idea. on my side, instead of just emitting a hit game object, that game object could have the skill area aoe. instead of just being a VFX GO it could be a Coord Effect. right? About the isometric and 3d is different, we need to think more in 2D rather on 3D. the hit box works differently. I don't know if i can share here images but I'll post a link. https://imgur.com/epYe7CR From that image for example, the pink monster, has to get hit by a large hit box, not just comparing with the root position. we need to think like the creature is printed on the ground, changing the areas of hit coord on X and Z. But I will try that idea you gave me and let you know Do you mean that on the client projectile that was moving from the caster into the mouse pointer position was hitting the target, but on the server effect wasn't invoked? If so, then it can occur, because, on the server, the projectile is not following after the target, but it's just checking if the target is within the cone of ability. It can also occur when the physics collider that you instantiated is bigger than the cone of ability. A solution for that would be to have not only a cone where you are defining the range and angle of the ability but other shapes like a rectangle for example. I know that some devs already implemented it in Atavism, like in this video https://imgur.com/a/1gIb9Q2 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.