I need to introduce angle = atan(10^2-sqrt(10^4-9.8(9.85^2-20*5^2))) / ( 9.8 * 5))

If I introduce that in my home calculator and linux ubuntu calculator good but when I use math epxression of unreal it is some sort of a chaos any idea?

The formula is to predict the parabolic shots. acceleration uniform.

And negative numbers become a pain. In math expression.

In linux calculator

atan((10^2-sqrt(10^4-9,8(9,8×5^2-2×0×5^2))) / ( 9,8 × 5)) this works in calculator, why not in unreal ?

What do you mean by “it’s not working”? Does it give an error? Is it not precise enough? And if it outputs the wrong result, you can share your blueprint code. Please explain your issue in more detail

Hello thank you to answer that quick, I have decided to not use mat expression and enter manually the paremeters and solve manually the equation

This is how it looks like

This is free to use for anyone no copyrights or whatever CCO or well idk…

Emmmh to calculate the needed (angle) having (distance needed) and ( initial velocity ) Non 3d just vector length and (altitude Yo) and ( custom gravity )…

I also used Chat GPT because it solved the equation part by part for me, it is awesome…

calculate atan((10^2-sqrt(10^4-9,8(9,8×5^2-2×0×5^2))) / ( 9,8 × 5)) or calcula or whatever your language is…

Thanks! I wish unreal made better math expression at some point it can be good for us the only blueprint gameplay coders… In c++ it would have been easier but I rather blueprints for the quick coding.
And yeah

I had that the altitude height did not do much there mmmmmmh this is a new formula different from chat GPT i don’t know what I did but it works anyways unless I see it has errors…

I could help you out if you clearly explained what the issue is. To communicate more efficiently, you can consider translating your reply beforehand and listing your goals with some bulletpoints.

Context: I used a game of ours of Creative Oven Studios called liberation special forces 1 version weapons… with rocket launchers to use the formula of parabolic trajectory by: " wikipedia " says galileo galiley “something like that” in 1600 about that year "but I am sure greeks and romans in the ancient era already developed something like that… to predict the necessary angle to reach a distance with a rocket…

h: 88 uus
v: 5000 uus/s
d: 7500 uus/s
g: (Gravity) 980 uus/s positive i believe or it can fail

TRUE it gives 7948 not accurate 100% BUT the h the height it was not very precise as the cylinder height is uncertain to be the right altitude where the shot is performed I know a trace to floor would be ok but not enough…

And also other results were very excellent specially long distances.

This website builds the blueprints pretty much no chatGPT and other AI well considering this is not AI … well I don’t even understand what the concept AI is, even if is a tranding topic…

LoL… I recommend to use that it is way advanced but well, you never know it has it’s advantages like… mmmmh idk… maybe the maximum height of the projectile? Of my trajectory prediction thing on blueprints.

Just gravity is? I mean it is taking other values if you want instead of 1000UUs/s initial speed maybe 5000 UUs/s…

example:

Vo= 1000 UU/s
g = 980 UU/s
h = 10 UU
D = 2500 UU
angle = ? that is what we are suposed to find that is the formula
t = ? same here we should find that WIP

I might have taken this too literally and assumed you were referring to Math Expression Node for angle = atan(10^2-sqrt(10^4-9.8(9.85^2-20*5^2))) / ( 9.8 * 5)), which would look like this:

I don’t want to ruin your day, but there are way too many parenthesis…
that is hard… so hard? How did you manage to introduce that equation in math expression ?

Yeah, they are added automatically for some reason.

Select the node and press F2 or in the Details tab where it says Name.

In case it happens to you: I had an issue with a specific UE 5 version where they are bugged, they crash the editor after any edit. Don’t remember which one, but seems to be fixed for 5.4.