# Tag Info

## New answers tagged mathematics

1 vote

### How to compute XP thresholds when scaling changes for each level range?

You are overcomplicating it. Doing the math once and storing it in a dictionary or list is perfectly fine. The time and memory footprint for the calculation (or read it from a config/ database) is so ...
• 3,383

### Simulate Velocity For A Projectile Moving Along A Spline

I think when a projectile is thrown it should have a burst of speed at the start and begin to rise slower as it reaches its peak height. Then as it starts to fall it should gradually begin to fall ...
• 4,961

### Simulate Velocity For A Projectile Moving Along A Spline

Remove the spline and split speed into 2 components X,Y ie Vector2. Fix a horizontal velocity.X from the spline. Apply a negative rather large value to velocity.Y, and each step adjusted for delta ...
• 338

### How to tell whether an expression is independent from frame rate?

Your conclusion assumes a fixed delta-time: u^deltatime​ Which is an invalid statement if delta-time varies across steps. Almost a given on modern systems. There ...
• 338
Accepted

### Inconsistent Speed Of A Projectile Traveling On A Bezier Curve

Well, unfortunately I wasn't able to figure this out. But I didn't want to abandon this thread without closing the loop. If you are on Unity 2022 LTS you can simply use the Unity Spline package. It ...
• 164
Accepted

### How to properly split damage against armor?

If I've understood correctly, I'd do this as a two step process... Calculate how much the armor absorbs, then apply the rest to the player. Something like: ...
• 1,166
1 vote

### Calculating average ttk given accuracy and healing

Partial answer: no healing In your case the healing is the culprit, which makes the whole thing extremly hard to calculate. I hope my equation for the special case of h = 0 (no healing) helps you ...
• 201

### A good genetic system?

To "see the parents" in their young ones you could implement following system: each stat has a 33.3% chance to be inherited from the father, 33.3% chance to be inherited from the mother and ...
• 201

### Calculating average ttk given accuracy and healing

If an approximation is sufficient then on average the target will take p*d damage per second and heal for h, so their net life loss will be p*d-h per second. Assuming p*d-h > 0, the time to kill is ...
• 131
1 vote
Accepted

### How to tell whether an expression is independent from frame rate?

One way we can formalize this is to say we have a function $f$ that takes some input game state ${\bf x}_0$ and a timestep $\Delta t$ and transforms it into the resulting game state \\$ {\bf x}...
• 132k
1 vote

### How to tell whether an expression is independent from frame rate?

I am wondering if there is a general approach to determining whether the expression that updates the value is "pinned" to real time, meaning that running one frame with delta time x is ...
1 vote

### How to tell whether an expression is independent from frame rate?

You are asking the difference between a mathematical derivative and a discrete derivative: Given an expression S(delta_time) which calculates how much to increase a value by each frame, an increase ...
• 338

### How to move in 3D space in first person mode?

Camera has it's own set of axes. You generally store any two of the three : camFront, camRight and ...

### Test if a point is inside a 3D cuboid, given the 8 corner positions, through code

If you can guarantee that the 8 points form a prism with pairs of opposite faces parallel (even if the corners aren't perpendicular), then we can simplify this significantly. We'll construct a ...
• 132k
1 vote
Accepted

### Euler Angle X is wrong after using Quaternion.LookRotation

If you want to enforce angular limits, keep it in terms of angles from the start. Don't count on an automatic conversion from quaternions to Euler angles to give you angles in a specific range, ...
• 132k