Friday, May 20, 2016

Development Update: 5/18-20/2016

Please Note: These are retroactive posts to show history and progress.

Progress Update 5/18-20/2016:
- Fixed a few bugs with the guns/weapons hitting the instigator.
So the problem I was having with the projectiles and the Ships/Aliens in game was that the Instigator wasn't properly ignoring hit own weapons when shooting from within his own collision. After trying numerous methods of "IgnoreMovingActor", I found that if you have this on a simulation based Actor/Pawn, then the Ignore call doesn't work.

To get around this, I made a test case 2 collision channels "Projectile" and "Object". Both of these were applied to either the projectile or the object, but both of these objects were set with the "Overlap" Flag instead of "Block". This allows me to catch the event of when the projectile overlaps with an Actor. If this Actor is the Instigator, then I disregard the rest of the Projectile's "EventHit" logic. See attached.




This allows me to still "push" other Actors, but doesn't allow me to "push" based on mass if I'm trying to give the other ship impulse. I could perhaps use a "RadialForce" if I wanted to do something like Gauss Cannons or Missiles.

Edit 2:
This totally worked. It seems though that with the addition of the Radial Force that I need to make anything in that radius be turned on for simulating physics during the explosion event.


-- TLDR; Made new collision channels and set Ships/Aliens to overlap on Projectiles. Projectiles then OnOverlapBegin check to see if instigator, if not instigator, do explosion/dmg/etc.

- Setup Spores to Spawn from Asteroids on chance base in blueprint and exposed in properties
- Setup Health on Spores (1000 HP currently = 10 bullet hits)
- Setup placeholder "blood splat" PFX when hit with bullets on Spores
- Setup some basic Death Logic
-- Spawns PFX and hides Mesh
BUG: Need to fix having the actor be destroyed better on death of the Spore since alot of logic is still firing on Death. Should build some stoppers on that.
-- Setup Placeholder Death "blood splat" that's bigger and slower to show Spore Death

TODO BUG: I've noticed that the Spores tend to accelerate during their lifetime making it harder and harder to hit them. I think this is caused with the AddLocalOffset since I've tried damping their LinearOffset and Rotational don't seem to be slowing them down. Need to find a way to fix this by accurately measuring their velocity and capping it.
Edit:
I might have figured it out. Notes here....

I think I found what I've been looking for with this node here... "Set Physics Linear Velocity" Blueprint Node.



I think I just found my fix for getting real Velocity! Alot of the problems I was running into was that I was overriding Velocity by forcing a local/world offset and doing a physics sweep which wielded 0 as the velocity. I was also doing some hack trickery with not having the Actor be simulated during this movement behaviour and only activating simulation when he crashed into stuff. Using this method instead, I can drive velocity (This only works on Simulated entities) and make sure it's capped for worldspace velocity to what I need it to! (This might fix my problem with the Alien Spores constantly accelerating).

So I tried this on the Player's Spaceship as well as the Alien spore, and BAM! It worked!

I noticed that the Spore is still gathering speed from impulses when crashing into stuff, so I made 2 additions to it
1. Linear Damping is set to "10" making it dampen the linear movement of physics simulation (when crashing into crap, or Spawning for example). 
2. Clamping the velocity Input onto this node from World Displacement Vector.


I'm not sure this is the best way around this problem since I'm still seeing a difference in speed on the Spores between those who have/have not collided with objects. Will be investigating further.


New video made demoing above.

No comments:

Post a Comment