0
How to create gravity in Javascript
I wanna create map with 2d object. But i need to know how to create gravity, styling objects and any other information.
4 Answers
+ 2
Could you please explain? What kind of 2d object? What does a map need gravity for?
What is "any other information"?
Are yo referring to a canvas animation?
+ 1
What kind of object? Do you use a particular library?
It would be helpful if you could link an example code.
+ 1
The basic idea of gravity in JavaScript is that the object moves down the y axis constantly.
So, create a function that moves the object in this way.
0
So Lisa . Listen me. I wanna create 2d object(cube). 4 button for controlling cube. And map with gravity. " I wanna create geometry dash".
i know how create object but have a problem with gravity in map. Do you have information about gravity in games?