firing a missile from my ship, is it possible to have an EASY function like Unity 3D
Posted: Sun Jun 24, 2018 8:51 am
Say what you will about the messiness of unity, and actually i'm sorta glad to be free of that mess (for the time being lol)... it has this function:
Physics.IgnoreCollision(Collider collider1, Collider collider2, bool ignore = true)
it is the standard way of firing projectiles!
I have already tackled the physics layers system in a previous project with Love 2D, and am likely about to integrate this in my new more swanky program, however it was an awful mindfuck
is there anything here that is as simple and neat as that function?
When you fire a bullet you obviously do not want it to collide with yourself, well this enabled you to pretty much ignore the physics layers (everything pretty much on the same layer), but be able to fire bullets with real physics... does anyone even have a strategy perhaps, as it stands to reason for me that it might even be nice to fire a projectile that CAN collide with myself, this might add extra danger gameplay, like don't get exploded by your own ammo.
Open question, sorry if it's not clear, I'll be sure to elaborate. Physics layers have just never ever really sat comfy with my object orientated way of thinking and also my desire to design games with ambiguity of who is the "GOOD GUYS" and the "BAD GUYS"... i like to break this model myself (also the physics layers, i mean how's that gonna work in multiplayer?).
I mean I get it, I can't do everything in Love 2D but it'd be nice
EDIT: omg it's looking like we're intimately attached to box 2d aren't we
Physics.IgnoreCollision(Collider collider1, Collider collider2, bool ignore = true)
it is the standard way of firing projectiles!
I have already tackled the physics layers system in a previous project with Love 2D, and am likely about to integrate this in my new more swanky program, however it was an awful mindfuck
is there anything here that is as simple and neat as that function?
When you fire a bullet you obviously do not want it to collide with yourself, well this enabled you to pretty much ignore the physics layers (everything pretty much on the same layer), but be able to fire bullets with real physics... does anyone even have a strategy perhaps, as it stands to reason for me that it might even be nice to fire a projectile that CAN collide with myself, this might add extra danger gameplay, like don't get exploded by your own ammo.
Open question, sorry if it's not clear, I'll be sure to elaborate. Physics layers have just never ever really sat comfy with my object orientated way of thinking and also my desire to design games with ambiguity of who is the "GOOD GUYS" and the "BAD GUYS"... i like to break this model myself (also the physics layers, i mean how's that gonna work in multiplayer?).
I mean I get it, I can't do everything in Love 2D but it'd be nice
EDIT: omg it's looking like we're intimately attached to box 2d aren't we