Development Update: 4/14/2016
Please Note: These are retroactive posts to show history and progress.
Progress Update 4/14/2016:
– Projectile VFX/Mesh is in with new glow materials
– Got Refire on guns to work now too
:Rant:
Physics in Unreal is SUPER annoying to deal with. Ignoring Actors but generating simulation on other actor BUT NOT allowing to DESTROY actor in same frame was amazing difficult to get through with blueprint, but finally resolved it. What I did was first I created a new object channel for projectiles (and asteroids) to give a default setup (I found out I really didn’t need to do this, but this will be good for the future). Next I needed to set the Instigator for Projectile be Ignored by physics when moving and Simulation on the Projectile needs to be disabled on spawn. Next, on HitEvent, I did a DoOnce (get to that in a sec) on Turn on Simulation and Spawn Particle Effect (explosion/impact, etc) and then also set all the visible components – VFX, Mesh – to be hidden in game. The reason why I did the DoOnce was because I was seeing multiple Particles spawned when a hit event occurred. This was likely due to the collision of the Projectile was happening multiple times after hitting the Asteroids. Also, the reason for the hiding in game was to allow enough of a delay to occur to destroy the actor safely AFTER simulation (to apply kinetic energy to the asteroid)…… OMG that was annoying to figure out. *rolls eyes*
:End Rant:
– Setup Default Projectile Features
— Setting Velocity of Projectile to be sum of Init Velocity and Forward Velocity of Ship
— Setup Projectiles to Collide with Asteroids and placeholder VFX
— Setup (finally) Projectiles to “push” asteroids based on Kinetic force
– Setup new Collision Object Channels – Projectile and Asteroid for future use.