Jump to content
  • 0

Projectiles collision larger sprites


GreatZ

Question

6 answers to this question

Recommended Posts

  • 2
2 hours ago, GreatZ said:

Can you show me how pls? thanks in advance

Well, it is what I said before, look in the client code specifically in the entities/projectile.cs file and where the spawn of the projectiles is managed, you will see the code in charge of assigning the animations, you just have to make the property that saves the animation be nullable or empty, and in the assignment of the animation you check if the object is null you do not do it, this is in a general way and what would be less complex, in my case I have the following:

86f4562b9d8ccc9d04848c49cf918d48.png

 

The second check is to avoid that two of the spawns collide in the same skill, in this way you do not completely eliminate the functionality that comes by default of being able to create separate projectile spanws.

b75793c6f9dc72cd0b4818f38b23b589.png

Hahaha this image explains a little better how to choose which spawn should have animation, credits to Arufonsu who also worked with me on this.

Link to comment
Share on other sites

  • 0

That sounds like a pretty hacky solution that won't perform very well when scaled up to larger amounts of players and projectiles.

 

Personally I'd invest time into making actual hitbox objects and base collision on those.

Link to comment
Share on other sites

  • 0

I understand your point, but restructuring the entire current hitbox system I see it a bit complex, at least I did not find any viable option so far that I can include in the engine without breaking everything, this solution that they suggested of the invisible spawns was suggested by the same JC in the past to have projectiles with larger collisions that are not pixel perfect since X amount of tiles is taken for each spawn.

Link to comment
Share on other sites

  • -1
28 minutes ago, Blinkuz said:

I understand your point, but restructuring the entire current hitbox system I see it a bit complex, at least I did not find any viable option so far that I can include in the engine without breaking everything, this solution that they suggested of the invisible spawns was suggested by the same JC in the past to have projectiles with larger collisions that are not pixel perfect since X amount of tiles is taken for each spawn.

Can you show me how pls? thanks in advance

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...