Let's say we want our acceleration to be an affine function of time, meaning we have a constant jerk. That makes our velocity vs time graph take the form of a parabola, with its directrix parallel to the time axis.
The general equation for such a curve is:
$$v(t) = a \cdot t^2 + b \cdot t + c$$
Since your parabola goes through the point \$(t, v(t)) = (0, 0)\$...
I note that your stars appear one after the other on your second animation. It suggests you indeed create them at different time, and let that be the cause of your objects be at different angles at some time.
Unfortunately, that means they will have individual _incrementX values. You made _incrementX be a function (mathematically speaking) of the angle, ...
I'm not familiar with the language you're using (GDScript?) but the usual reason for negative sides of a grid to be off by one is that you're using an operation that rounds towards zero, where you want one that rounds down.
t.x = int((pos.x/x_size) + (pos.y/y_size))/2
t.y = int((pos.y/y_size) - (pos.x/x_size))/2
I looked for documentation and this page says
If your projectile is fired on a 45 degree angle, that's:
$$ \vec v = (c, c)$$
...for some scalar component \$c\$.
Gravity doesn't affect the horizontal axis, so the time it takes this projectile to cross the horizontal distance to your target is:
$$T = \frac D c$$
Now we can plug that into the equation of our parabola on the vertical axis, tracking the ...
I had to go through a similar situation lately, and here is something that might be more complete than the provided answer.
You provide a normal and the origin. Using the origin is a very specific case, so I'll use "point on the plane", or simply point, which is a bit more generic.
Let's start by going into standards and finding the plane equation ...
Did you want this?
var localVelocity = transform.InverseTransformDirection(worldVelocity);
var localVelocity = Quaternion.Inverse(orientation) * worldVelocity;
This gives you a vector in the local coordinate frame of the transform/quaternion, where the z component is the forward velocity, the x component is the sideways velocity, and the y component is ...
This is a prototype lookat function , in which an object forward will point towards a defined position. In your case the Up vector can be set to fixed value since the object does not need to pitch up or down.
Hope this helps
glm::vec3 obPos = glm::vec3(sceneEntity->getPostion().x(),sceneEntity->getPostion().y(),sceneEntity->...
Set Xp Rewards
The worst challenge is the fair average reward definition. There are several ways to gain experience: defeat enemies, accomplish mission, consume items, bonus and so on. It's generally effort with some difficulty, expended time and other things that should be measured using a criterion. How can we simplify it?
We can think about a lot of ...
The dot product should tell you if the camera is looking roughly at the enemy or away from it. You have it in comments:
var facing_target = direction_facing.dot(direction_to_enemy)
Now, if that is less than 0, it means the camera is looking away from the enemy. In that case, take screen_pos and scale it, such that when you clamp it it will be on the edge of ...