+ 1
Help
Why is the blue cube moving fast? And this is provided that the variable DX is equal to 1, which in the end should not speed up the blue cube so much https://code.sololearn.com/WtGC0dkn9lLw/?ref=app
5 odpowiedzi
+ 2
because you do not use the timestamp argument available in the callback function function passed in the requestAnimationFrame function call ^^
that's the minimum to handle how fast move anything animated by this way (you cannot expect any animation cross browser/device speed without handling this ;P)
+ 1
How many age to start this app
+ 1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
int x = 89;
Console.WriteLine(x);
}
}
} Help me in c, sir. Try it yuor self
0
https://code.sololearn.com/WrQV9llKA7b0/# here is the problem. the dx and dy is too high
0
If the blue cube is moving fast despite the variable DX being equal to 1, there are likely other factors at play that are contributing to its speed. The variable DX alone, which presumably represents a change in position or velocity, may not be the sole determinant of the cube's speed.
Some possible reasons for the blue cube's fast movement could be:
Initial velocity: If the blue cube had an initial velocity or momentum in a specific direction, it could continue to move at a fast pace even with a small change in position (DX). The initial speed could be due to external forces, previous acceleration, or an initial push.
Acceleration: If there is an acceleration acting on the cube, it can increase its speed over time. Acceleration refers to the rate of change of velocity, so even with a small change in position (DX), if the acceleration is significant, the cube's speed can increase rapidly.
Time: The time factor plays a crucial role. If the blue cube has been moving for a long time, even small changes in position (DX) can accumulate over time, resulting in a noticeable increase in speed.
External forces: It's possible that external forces like gravity, friction, or other interactions are influencing the cube's movement, causing it to move faster than expected. These forces can affect the cube's acceleration and speed. https://www.mybkexperience.one/