#grenade

1 messages · Page 1 of 1 (latest)

bronze lotus
#

Simply wait 1/2 seconds before making it explode.

#

Additionally, you may want to add some bouncing off the ground to make it more realistic.

bronze lotus
#

You'd have to get a vector normal (perpendicular) to the surface of which the grenade bounces off.

#

Dot product is implemented in Skript and it will be useful for getting a "reflected" vector across the vector normal to block's surface.

bronze lotus
#

It only covers a 2D case, but you get the idea.

runic sparrow
#

this is sick asf

dusk heron
#

nice mrcrayfish and explosive enhancement

#

you should make it rotate a bit more

lunar spindle
# bronze lotus

I think it's a bit more complicated since it's a curve and not a straight line

bronze lotus
#

Not to mention I have never seen a curved vector.

#

It's tangential to the trajectory of grenade at the point of bouncing off.

bronze lotus
#

Scaled up version of the drawing with a grenade's trajectory added to make it more understandable.

#

Notice you have to repeat the computation of a reflected vector n times where n is the number of grenade bounces.

lunar spindle
#

okay, now I'm motivated to make a bouncing ball or smth, thx

bronze lotus
#

Also, it's important to add some kind of threshold at which grenade stops bouncing off.

#

You don't want it to bounce dozens of times within a few seconds at a scale of a few millimeters.

#

You can imagine how would it sound if there was a sound of a grenade bounce implemented. Basically, trrrrrrrrr...

lunar spindle
#

yeah, you need to simulate it losing some energy by hitting the ground

bronze lotus
#

Yes. Threshold is essential too because we don't care what happens at a scale of one millimeter (if not less).

#

It wouldn't be noticeable anyway.

#

Oh, and changing bouncing sound's pitch based on grenade's velocity would be great too.

#

But that's a detail. First focus on making it collide like a real thing.

lunar spindle
#

yeah

valid steppe
#

That would be sick

bronze lotus
#

Maybe a raytracing issue? The raytrace can be not "dense" enough.

#

Or decrease the size of a step.