Projectiles and physics knockback



  • Hi There,

    I'm trying to use a portion of 3DTD and in my project the bullets and bolts send my game objects flying off into space. It's hilarious at first observation, but tuning the mass settings and doing anything short of changing colliders into triggers doesn't seem to matter or help.

    My question is - did you make all your enemies use triggers to avoid the projectile knockback from the physics engine?

    Thank you,
    Ryan



  • Hey Ryan,

    yes, all projectile/enemy collision in this kit is handled via triggers. Both the projectiles and enemis have a RigidBody attached to them, but it is set to kinematic only, without gravity, basically for disabling the physics behavior. By default, physics such as knockbacks wouldn't work either way, because the movement script for enemies is using tweens on fixed path, so they can't leave their path or get "pushed away" (this would work with a pathfinding script, but with tweens the new path would need to be rebuild when kicked off-path).



  • Hi Baroni, can you play around with the physics knockback and change how it works or is it set in stone, so to speak?



  • Bruening:

    As I wrote in the last reply, there is no physics knockback, because enemies don't use gravity. You would need to rebuild the movement to work with gravity, which tweens aren't designed for.


Log in to reply