mysterymagination / ryddelmyst

cutethulhu meets Castlevania on the battlefields of Final Fantasy Tactics!
GNU General Public License v3.0
2 stars 0 forks source link

Physics asset colliders can get in the way of hitboxes and even collision cylinders #84

Open mysterymagination opened 1 year ago

mysterymagination commented 1 year ago
mysterymagination commented 1 year ago

Screenshot (32) smdh

mysterymagination commented 12 months ago

I fixed the collision assets for Maya, verdant golem, and treant and the interception of projectiles issue is looking good. Sadly, this did not fix the Hitbox <-> Hitbox collision profile events being missed problem; when I turned off the hack to recognize Maya in Attack::OnHit() and pull out her hitboxy stuff hardcoded, she stopped receiving hits because only her collision cylinder was sending collision events back to the treant's claws and the collision cylinder is not one of my IAttacker/IDefender implementers. I even found that her skeletal mesh had collision turned off and I was like OOH OOH an answer that makes sense! But making her sk mesh collision default (match that of treant) did not help.

mysterymagination commented 12 months ago

The snowballs work fine hitting Hitbox channel components, though they use the Projectile channel themselves. I think the issue somehow relates to my custom Hitbox channel hitting other items in the Hitbox channel, even though Hitbox profile is set to Block other Hitbox channel items.

mysterymagination commented 12 months ago

Hmm, actually it seems the jank auto generated physics asset collision isn't affecting anything; I still have some instances of flubbed shots (appeared to connect but didn't process through HitBoxer Component to the Attack API properly) and when I experimentally changed the physics asset collision capsule on the verdant golem to be much larger than any of his hitboxes my snowball projectiles still delivered the collision event to said hitboxes. Expanding his collision cylinder beyond the hitboxes, however. does stop the snowball projectiles' Attack from going through as expected (i.e. we see the snowball hit his shapely collision cylinder and then nothing else because it has no defense data) since that cylinder is not (and cannot be) an IDefender. Soooo this ticket is mostly a non-starter, but I'ma use it to explore the HitBox <-> HitBox collision issue again.

mysterymagination commented 12 months ago
mysterymagination commented 12 months ago

todo: try changing the HitBox collision profile so it blocks WorldDynamic objects? Projectile collision profile has that ticked.

mysterymagination commented 12 months ago

todo: does it matter that Maya's body capsule is parented to her skeleton?

mysterymagination commented 12 months ago

Curious note, the treant AI kept thinking Maya was too far away after I increased the radius of her body capsule hitbox; this may suggest Hitbox <-> Hitbox collision blocking properly in at least the getting near to each other case? I guess that would point the finger at the differences between block collision and the on component hit event. EDIT: idk, I tried making a HitBox super simple capsule collision shape huge and Maya still gets right up next to the clawcube. HOWEVEr, the treant is getting bounced off her way far away... so maybe my clawcube is setup wrong somehow? todo: wtf^ ?

mysterymagination commented 12 months ago

~todo~: try changing Maya's body capsule to BlockAll/BlockAllDynamic; we really don't need the HitBox custom collision profile, I mostly wanted it so that I could decouple environmental/physical collision from combat collision. EDIT: nada. Also tried Pawn collision profile and changing treant claws to BlockAll/BlockAllDynamic with no collision happening betwixt anything but the claws and Maya's collision cylinder as per usual.

mysterymagination commented 12 months ago

~todo~: try adding a ClawCapsule around Maya to see if she could generate HitBox <-> HitBox collision events more easily with me driving the weapon use. EDIT: we wind up hitting the treant collision cylinder same as he hits ours.

mysterymagination commented 12 months ago

todo: focus on the differences between Snowball -> Monster hitboxes and ClawCapsuleComponent -> Maya body hitbox

  1. ~Snowball is Projectile, but it still works fine when made to be HitBox collision profile and changing claws to Projectile doesn't help.~
  2. ~Snowball has sim physics on, but turning it on for claws and body capusle (or on for claws and off for body capsule or off for claws and on for body capsule) didn't help.~
  3. ~Snowball is not a ACharacter and does not have a default Pawn collision profile collision cylinder as the root of his transform hierarchy; he is free to make the weapon the root. Maybe this has some bearing on the behavior of OnComponentHit events?~
    • Removing SetSimulatePhysics(true) from SpellSphere as a Projectile collision profile in the Snowball ctor results in it still colliding with HitBoxes properly, and it reports an OnComponentHit event with Maya's body capsule if I run fast enough to be hit by my own snowball. That's mostly interesting since I think it's the first time I've seen anything hit Maya's body capsule. Same with Snowball having HitBox collision profile results in same. So, there's a definitive HitBox <-> HitBox OnComponentHit going off properly!
    • ~todo~: try creating an Actor in the map that has a hitbox claw capsule and maybe a static mesh but isn't a Character subclass, then walk Maya into it to see if its claw hits her body capsule. EDIT: usual deal, it still just hits her collision cylinder for some reason. So I guess the Character situation on the IAttacker end is not necessarily the problem.
  4. todo: we're planing to add projectile weapons to monsters anyway, so go ahead and do that (make 'em similar to Snowballs) and see if they hit Maya's body capsule properly.
mysterymagination commented 11 months ago

~todo: try adding a basic CapsuleCollision to Maya to see if it can receive the oncomponenthit events~

mysterymagination commented 11 months ago

~todo: try replacing the root component of Maya with the simple capsule? EDIT: you can't for a Character derivative~

mysterymagination commented 11 months ago

notables list:

  1. Snowballs with HitBox or Projectile collision profile can hit treant HitBox collision profile custom IDefender uprims
  2. A giant simple capsule collision under Maya's collision cylinder root pushes back against treant collision cylinder, but not his hitbox uprims or anything of the clawcube. Using Pawn/HitBox collision profiles between either side doesn't seem to make a difference in this. Her giant capsule also does not interact with the stage floor static mesh for some reason, even with Pawn collision profile.
mysterymagination commented 11 months ago

~todo~: try changing Maya's collision cylinder to HitBox collision profile or NoCollision profile or something

mysterymagination commented 11 months ago

~todo~: try toggling off Simulation Generates Hit Events in the collision primitives of interest; the Character root collision cylinder has that UNchecked. EDIT: seems to have done nothing

mysterymagination commented 11 months ago

todo: if we ever figure this out, it would be nice to move Pawn to the Ignore list for the HitBox collision profile; that way we wouldn't need to worry about Character collision cylinders intercepting HitBox projectiles (which I verified can happen by making the collision cylinder huge on the treant and firing snowballs at him that he ate).