Tag Info

Hot answers tagged

4

To put it simply - winding order. Winding order is the way you define which side of a triangle is the front and which side is the back. For example, OpenGL's default winding order is counter-clockwise, which means the triangle on the left is pointed out of the screen and the triangle on the right is pointed into the screen. If you had back-face culling ...


3

There is no usual way. It all depends on how precise you want your simulation to be. A very cheap way: You can improve on this by using it as a starting point and then adjusting the position more realistically. To rotate the vehicle as it moves have each wheel rotate the car by using its opposite wheel as the pivot point. If it becomes too ...


3

Just about the easiest way to do this is to calculate the cars position from the road, and it's rotation with the normal of the road, like you mentioned yourself. This will cause your car to stick to the road even if you create an abrupt fall in the road however. To solve jumps on the road you either have to simulate falling yourself by keeping track of the ...


2

One simple options is to just draw everything twice. Consider a screenful of your background clouds and other stuff that you want to scroll: +------+ | CC | | RR| +------+ (Assume that CC represents a cloud, and maybe RR represents a rock or some other background object.) If you have a "second copy" (logically or physically) of this background ...


1

On LibGDX you have a so called InputProcessor public class MyInputProcessor implements InputProcessor { @Override public boolean keyDown (int keycode) { return false; } @Override public boolean keyUp (int keycode) { return false; } @Override public boolean keyTyped (char character) { return false; } ...


1

Simple, give the monster a hspeed, vspeed speed components, after that find the direction to the next point in the path with the tangent, which if I recall correctly would be y2-y1/x2-x1, being x2 and y2 the point of the next position and x1 and y1 the monster one. After that use the cosinespeed to find the x component or hspeed and -sinespeed for the y ...



Only top voted, non community-wiki answers of a minimum length are eligible