Advanced bullet dropoff?

I know bullet dropoff has been done but what about for sniping long ranges, a wind modifier, so that it would be more realistic than just “center crosshair, click mouse.” The bullet would go off to the left or right depending on the wind direction. Would anyone be able to do this and put it into a swep?

Well first of all, there’s no wind in Source. So someone would need to code wind which would be hell hard because the wind would have to affect everything. And then you could do it, but how will you tell where the wind is blowing? Unless somebody is a 1337 coder and can code wind that is good enough to be able to tell which way the wind is going with a flag or an object of some sort, this is impossible.

So, you need the wind first of all, then this. So ask for the wind first.

There is wind!
There’s an entity in hammer that simulates wind.

Probably just a trigger_push and env_smokesomething.

Or quite possibly env_wind.

This can all be done using math and traces. No physics needed. Wind also isn’t a problem, it can be a variable angle which offsets trajectory.

[editline]09:17AM[/editline]

Pardon me, variable angle, and normalized intensity.

No there’s no such thing as env_wind I’m pretty sure otherwise Valve would have used it themselves in one of their games at the very least.

It is on the valve developer wiki. http://developer.valvesoftware.com/wiki/Env_wind

Quoting: This is a point entity available in all Source games.

Ah sorry, thanks for that, but either way, wouldn’t the Advanced Bullet Dropoff only work in certain maps that HAVE env_wind? I don’t think construct has env_wind (does it?) So either way it wouldn’t work too well unless someone would rather code a server side wind script. That would be useful.

And, the bullet doesn’t even have a physical objects (that i know of) so it would be easier to just simulate drop with a custom bullet prop.

Isn’ Hammerwind random??? and how would one know which way the wind is going??? My idea was addign what is called Kentucky windage…
IF YOU UNDERSTAND WHAT KENTUCKY WINDAGE IS THEN READ NO FURTHER!!!
Kentucky windage is the way the bullet moves up and to the right, because of the bullets spin…

For a simple drop off you could just angle the bullet at an angle that is subtle but at distance would show up.

The wing stool or fin stool has a wind, if you enable wind on the prop it will blow around.

But you don’t need a wind mod for this or make the wind affect everything else. You can just have a varaible wind direction and speed that could change over time and on your physics bullet take that into account while is physics are being simulated. You’d probably need to make a hud to indicate the direction and speed of the wind also.

What are you talking about? Don’t use in-game physics for bullets. Don’t use models either.

Use traces and mathematics.

[editline]08:16AM[/editline]

There’s a thing called “Google”.

So wouldn’t you need a specific map because env_wind is put in only by the developer? What I’m saying is, if the map doesn’t have env_wind the script wouldn’t work. And I don’t know of any maps with env_wind.

You don’t need entities, either. You can pull it off with just traces and math.

Amcwatters is describing a very simple concept here. You don’t need to physically simulate wind because traces aren’t affected by them, I’m not sure why everyone else in this thread seems to miss that point. He’s suggesting that you simply make the bullet hit x units lower than the trace when the victim is y units from the shooter.

Basically, think of this: http://www.garrysmod.org/downloads/?a=view&id=90523

Except without exaggerated splines.

amcwatters didn’t he make that? Unless I’m mistaken amcwatters is not who I think he is.

Everyone knows who I am, because so many people hate me.