#They go brrrrr

1 messages · Page 1 of 1 (latest)

raw kettle
#

what if you shoot at a position based on target velocity X ms into the future factoring in velocity of the bullets?

cedar gate
raw kettle
#

cookin

cedar gate
#
  • getting the aim point from perceivable comp to not shoot at the feet
raw kettle
#

true, alternatively bounding box center

cedar gate
#

ohh true

raw kettle
#

vector.Lerp(mins, maxs, 0.5)

cedar gate
#

vanilla prefabs all have the first aim point in the center. But cant use that for other mods

raw kettle
#

maybe perceivable component is the way to go as you could make it ignore everything that is not perceivable?

cedar gate
#

so bounding box is a good option

raw kettle
#

but doing FindComponent when seeking targets is not what I would call efficient 😦

cedar gate
#

only need to do that once for new targets

raw kettle
#

maybe better off modding character and vehicle class and just doing some init where you'd store all the potential targeting information

cedar gate
#

I guess bounding box center is a good start

raw kettle
#

in any case excited to see this progress because aircraft pilots need a reminder how fragile aircraft is

#

once you get the prediction working maybe it could shoot down RPG rockets hehe

rough elbow
#

had my volume down when first playing this video and it sounded super farty

cedar gate
#

same sound as the big turret :p

raw kettle
#

use it to shoot down projectiles fired by my bomber zombies LMFAOO

#

I wonder if those blobs would even collide with bullets, or rockets in general

#

rockets have colliders I think so maybe

#

idk if this is even something you'd be interested in but if it helps inside bacon photo props there is an emitter that fires slow moving rpg7 rockets

cedar gate
raw kettle
#

iron dome

cedar gate
raw kettle
#

looks great so far

#

so for predicting path you'd do something like aimPosition = targetPosition + (targetVelocity * distance/projectileSpeed)?

#

for a shitty leading implementation

proper saddle
proper saddle
raw kettle
#

is this 100% scripting or is it AI driven?

#

I'm wondering if making this an AI agent you could access AI ballistic tables and use the aiming features that have leading built in

proper saddle
#

Somebody used AI before but it didn’t work too well

#

It had a low range and was extremely inaccurate

raw kettle
#

you probably mean something like an AI gunner inside the turret which is irrelevant

#

I mean making the turret entity itself an AI agent

proper saddle
#

Oh

#

Maybe idk

#

I can’t remember

#

I just know they used some sort of AI and it kind of sucked

raw kettle
#

it makes sense as AI characters in turrets is useless a lot of the time, but is not really related to what I am thinking about

proper saddle
#

I’m just confused on what difference it would make

raw kettle
#

other than it being completely different?

proper saddle
#

Would it not still be inaccurate?

#

(I don’t understand enfusion ai)

raw kettle
#

dont compare it to a character using a turret

#

your own AI agent can work the way you want it to work

cedar gate
#

no ai

raw kettle
#

I honestly dont think the effort on making this an AI agent is worth it

#

the chances of it being perfect vs useless are equally high

cedar gate
#

true

#

and with scripting you have 100% control

raw kettle
#

but through access to AI ballistic tables and aiming you can swap out munitions and it would Just Work™️

cedar gate
#

i can do that

raw kettle
#

otherwise I am not sure you can get the projectile velocity of the loaded round in script?

cedar gate
#

check the BallisticTable class

#

op

proper saddle
#

I see what he means

cedar gate
raw kettle
#

oh ok great that should be sufficient

#

however this does not have leading so you'll have to add it on top

cedar gate
#

that what i use to include ballistics but not lead

#

exactly

raw kettle
#

maybe you could do something like save time to 1000 meters in init and then you could use it to compute velocity for leading for every munition

#

idk

proper saddle
#

You also could* script in inaccuracy chance

raw kettle
#

no, you dont

proper saddle
#

You don’t?

raw kettle
#

I mean you can if you want, but you'd usually add some randomness to each bullet being fired anyway

proper saddle
#

Oh okay

raw kettle
#

otherwise they'd all fly the same trajectory

proper saddle
#

I mean if bon really wanted he could make it 100% accurate I guess lmfao

cedar gate
proper saddle
#

🫡

cedar gate
#

but thats with just 250 projectile speed

cedar gate
proper saddle
#

💀

raw kettle
#

dope, whats the formula you ended up using for leading?

raw kettle
#

really it was that simple?

cedar gate
#

idk I just used it and it kinda worked

raw kettle
#

maybe im not as bad at math as I think I am

cedar gate
#

I set projectilespeed to 250 to test but the longer you shoot the leading breaks

raw kettle
#

only when objects move away from the shooter?

#

I think air resistance might be screwing up my shitty formula

#

the bullet slows down over longer distances

#

the good news is at 1000m/s you might be able to be accurate at 4x the current distance

cedar gate
#

using a random tracer round with 890.000 init speed

raw kettle
#

this looks like the code still thinking its 250

cedar gate
#

i hardcoded that

raw kettle
#

this with hardcoded 890 then?

cedar gate
raw kettle
#

making me want to try this but I'd have to invent the turret first

cedar gate
#

will make it public soon ^^

raw kettle
#

neat, I'd be interested in seeing debug shapes of target position, aiming position, and target velocity

#

stuff like that haha

#

I wanted to do this eventually anyways

#

how do you determine if its ready to fire? dot product or something?

cedar gate
#

im lerping to the target pos and if lerp is 1 go brrr

raw kettle
#

I think projectileSpeed or whatever needs to be smarter in the equation to factor in bullet drop over the distance and stuff

#

since distance to target of a round is not linear with air resistance

#

like the time doesnt scale linearly with distance

#

or rounds with no air resistance lol

cedar gate
#

just tried that but same problem

raw kettle
#

well precomputed ballistic table might still be using values computed with it

cedar gate
#

Looks like with lower DTime is hits better thonk

#

I tired different update times, frame and physics

raw kettle
#

make the spread big enough to hit it eventually

cedar gate
#

Green is bounding box center and blue is aim point

raw kettle
#

bounding box is not up to date on where the model is?

#

wat

cedar gate
#

on normal dtime yea

raw kettle
#

does aiming use EOnFrame?

#

I'm not sure if the misplaced bounding box/model stuff is the problem here though

cedar gate
#

its a system

#

i tried frame and simulate physics, post sim phyiscs and after physics

raw kettle
#

wut

#

I hope this is just a glitch of the time setting

cedar gate
raw kettle
#

interesting that it aims well in slowed simulation but not real time

#

I hope you are not being arma'd

cedar gate
#

Whats the point of the system points if you have to hardcode the time anyway ._.

raw kettle
#

idk I barely use Systems

#

no inheritance lol

#

miss me with that

cedar gate
#

in the system script you set the timeslice anyway
float timeSlice = GetWorld().GetPhysicsTimeSlice();

raw kettle
#

bc it doesnt give it to you like timeSlice on entity or component?

cedar gate
#

yea

raw kettle
#

I think I read somewhere that it is planned to have a way to define how often they iterate

#

but not implemented yet

#

but no inheritance for systems classes kills it for me

#

have object oriented language but u cant use it here because reasons

cedar gate
#

idk what I did but with physicstime it spawn 100000000 projectiles, crashed my game and wont open WB anymore 💀

#

I got arma'd

raw kettle
#

was fun while it lasted

cedar gate
#

yea

#

next project

raw kettle
#

rest in pepperoni

cedar gate
#

nvm whole WB is broken. Next game gg

proper saddle
#

So how’s it going

raw kettle
#

or tag system

cedar gate
#

sphere cast

raw kettle
#

oh my

ionic stag
cedar gate
#

depends on what you set in the turret

cedar gate
#

looks like bounding box is just lagging behind

#

origin + aimpoint it is

raw kettle
#

Get bounding box center once and add to origin as offset?

cedar gate
#

but if its exactly on the frame where to bounding box is offset?

raw kettle
#

Tbh bounding box might change too

#

😦

cedar gate
#

and if I add offset might aswell use aimpoint

raw kettle
#

Yeah

proper saddle
cedar gate
#

yes

proper saddle
cedar gate
#

it do be going

proper saddle
#

Can’t wait to see bon

cedar gate
raw kettle
#

darn it wouldve been cool if they did

cedar gate
#

I could fake it and just explode the rocket after 1 sec of shooting at it :p

raw kettle
#

might have to since collisions would be not in sync anyway probably

cedar gate
#

yea that would be a nightmare to calculate the collision at these speeds

rough elbow
#

You could try adding one of the SCR_DamageManager components to the rocket

#

otherwise it might just be missing the collider it needs

#

yeah missing a FireGeo

proper saddle
raw kettle
#

I don't think using physics collision to shoot down rockets is a good idea because it will desync

proper saddle
#

You could use a invisible collider beam instead of making each bullet have to collide

#

If that makes sense

cedar gate
raw kettle
#

hows it look in multiplayer?

cedar gate
#

not mp ready yet. need to code all that in first

raw kettle
#

nani

#

h-hes fast

#

are you still using sphere query? can I ask whats the performance like when you put this in a town or next to a forest?

cedar gate
raw kettle
#

on the upside it will prevent people from firing at you when you are next to it because it will take them 5 hours to aim with 1 fps

cedar gate
#

rip xbox ppl

raw kettle
#

ah no nevermind it would eat server fps only

cedar gate
#

but that lags players aswell

raw kettle
#

yeah ping becomes like 1000

cedar gate
#

Soo time to rework the targeting without spherecast

#

Im never gonna target buildings and trees / static stuff anyway

raw kettle
#

the way I "solved" it for my VTOL HUD was to iterate over all editable vehicles instead of doing a trace, but I don't have a good solution for finding projectiles.

@ruby turtle did you figure out your projectile detection stuff and could you possibly share how you ended up doing it?

cedar gate
#

I could override some comp on a missle and keep a list with all active ones

cedar gate
#

Actually yeah super simple, just new comp tracking every projectile if its shot

ruby turtle
cedar gate
#

No more -60fps blobcloseenjoy

#

Now with EditableEntity and custom projectile tracking

raw kettle
proper saddle
raw kettle
proper saddle
raw kettle
#

that'd be more on topic yeah

cedar gate
#

yeah this is my thread ._.

#

normal projectiles dont have rpl comp hmmmmmmmmm

proper saddle
raw kettle
proper saddle
#

That’s weird

cedar gate
#

for all mods no

proper saddle
#

I mean like in enf showcase lol

cedar gate
#

Maybe rplprop the target ent, and shoot clientside? except rockets cause they have rpl comp

#

aiming signals are replicated anyway

cedar gate
#

mp is ready, I just forgot LoS. Hopefully raycasts are not that expensive

raw kettle
#

you can run them every second frame or so it should be sufficient

cedar gate
raw kettle
#

sweet

hasty solstice
#

Can be spawned with GM? Can't find it

cedar gate
#

yea us and ussr. Search doesnt work , need to scroll a little to find it

cedar gate
#

But looks it its not working ingame but peer tool worked notlikemeow

cedar gate
#

Fixed now 🙂

honest prawn
#

.

hasty solstice
#

I think something is not working

cedar gate
#

Looks like aiming is offset a little. So weird, cause its working find in WB + peer tool

#

Will look into it, thanks for testing blobcloseenjoy

hasty solstice
#

The videos are singleplayer, I can try to ask a friend test it on a dedicated server

#

Does it have a minimum detection distance?

#

It seems that whenever there is a helicopter on the map with an enemy entity inside, it automatically detects it and starts firing, with no line of sight or distance limit apparently

cedar gate
#

3600m

#

should only fire with LoS tho thonk

hasty solstice
#

In the first video you can see that it starts shooting without line of sight

proper saddle
cedar gate
#

LoS is fixed but not sure why it shoots in the wrong direction on dedicated blobdoggoshruggoogly

honest prawn
#

Someone else had a cwis before and it did the same thing, the way you had to fix t was place it, take off and fly close enough to where it starts shooting, then go into GM and turn it until it hits the helicopter, then it would aim properly, but not always

raw kettle
#

I think it was done differently

cedar gate
#

It cause I didnt factor in the turrets current rotation

#

I forgor to test with a rotated one meowfacepalm

cedar gate
raw kettle
#

will help with turrets that go on the bottom of a ship hull etc

ocean bane
raw kettle
#

those look like debug line visualizations

cedar gate
#

or the rockets it shoots down? I just spawned them to test

ocean bane
#

I’m wondering now if it’s at all possible to turn those rockets into a placeable gm item so that the CWIS can have a larger threat to deal with.

cedar gate
ocean bane
#

Tried and it doesn’t sense them☝️😔

cedar gate
#

target finding is a bit bugged rn

ocean bane
#

All good. Mod’s great though🙌

cedar gate
#

Latest updates are on my discord (link in profile) ^^

ocean bane
#

🤙

raw kettle
#

game master fx has shells not rockets so prob not idk

#

does it differentiate between rockets fired by friendlies or not?

ocean bane
#

No. It does not.

raw kettle
#

so if I fire an RPG close by to the turret chances are it'll mow me down? sign me up

ocean bane
#

🗣️‼️

cedar gate
ionic stag
#

Don’t know how much overhead that would add if you only check each valid projectiles faction

cedar gate
#

technically yes