Author Topic: Projectiles ignoring bricks and such?  (Read 1603 times)

Uh no. Looks like you just jacked the projectile spread resource then set the spread to 0. I guess you don't have a very strong knowledge of vectors.Yeah.

Secondly, If a bullet enters the corner of a brick this is going to alter its trajectory completely. For example:I didn't realize that

I think you'll need some more serious maths than this to make this solution work.yes. If instead you created it at the position the projectile hit the brick, but further along its flight path, it might work

Edit: Sorry, looks like you just jacked it out of the Shotgun add-on.Yeah, but who hasn't at this point? Besides, that came from the resource, which is a resource for a reason. You even left the recoil line in there? Just for your information, all of that isn't necessary to create a projectile.I realize that. The lines dealing with the spread could be taken out, among other things, to shorten it down a great deal. Also, it is not jacked directly out of the shotgun add-on, as I took out the for() loop that was used to produce multiple projectiles.(didn't figure he would need it, but I didn't know if he wanted spread or not.)

What if you created the new projectile at the exact location where the collision occured in the same vector. I beleive this would work because whenever an object is spawned inside another, the object can move freely throughout it until it leaves. Say, in blockland you F8 into a very large brick, you are still able to leave the brick on foot and shoot from within the brick. Why wouldn't this work for the projectile.?

It might, I dunno. I'll edit my previous script to do that.
Edit: edited.

My solution is still the simplest and I couldn't code for my life. Ha ha.

My solution is still the simplest and I couldn't code for my life. Ha ha.

Your solution fails to take into account the possibility of two bricks being in the way.

My solution is still the simplest and I couldn't code for my life. Ha ha.
Then why are you posting in the coding help section?