Hi all, I have two strange behaviours.
In my game I can throw bombs and when I am very close to the walls, I can see across of them and throw bombs too.
I must say the walls are physics objects, like the bombs.
The other strange behaviour is when the bomb is launched from a third floor, it can through the first floor too.
All the floors are Quads Geometries.
So you have bugs in your code ^^ If you just copy-pasted (which I guess if you sit before it with wide eyes wondering why the shots go through the wall) then you probably also copy-pasted the part that puts the projectile a bit before the character so it doesn’t collide with it when you shoot.
Sure, I put the bomb in front of the character with a distance of 0.5f, so It doesn’t collide with the character and this is I want, but the wrong of that is when I am attached to the wall or other narrow geometry, the bomb is ubicated back from it.
How can I do the bomb doesn’t go through the wall or other geometry and doesn’t collide with me (character) ??
Well do a ray test or something to check for any obstacles.
Thanks, I will do that.
But, what can be happening when I throw a bomb from third or fourth floor to the first floor and the bomb also go through this last?
velocity of the bomb or thinness of the floor???
How should I know? Its your code. If you don’t know what it does and why it does it you should maybe go back and try to understand the code you copy-pasted in.
Well I asked because I assumed that is physics engine because the bomb and the floor are physics objects and this happens only a few times (5% maybe), and I understand all small copy-pasted code.