A simple term for "translation", the change of position of an entity typically on the route of going from point A to point B.

learn more… | top users | synonyms

1
vote
2answers
90 views

Framerate dependent movement

I'm moving my character controller using Euler integration like this: Vector3 originalPos = transform.position; Vector3 acceleration = Physics.gravity; velocity += acceleration * Time.deltaTime; ...
8
votes
6answers
2k views

How do you move a sprite in sub-pixel increments?

Pixels are either on or off. The minimum amount you can move a sprite is a single pixel. So how you make the sprite move slower than 1 pixel per frame? The way I did it was to add the speed to a ...
0
votes
1answer
36 views

Space Invaders: Getting the aliens to move as one [closed]

I'm having issues getting my invaders to move together. Currently they hit the edge of the screen and then go crazy. Here is the code for the Alien: #include "Alien.h" #include <iostream> ...
0
votes
0answers
16 views

Move body LibGDX Box2D

Hello I have a body and I want to move it. When I press the mouse button my body should move at that position (on the const speed)on the screen. I have override two methods(x1, y1 - point where my ...
0
votes
1answer
73 views

How to rotate and move a model in the direction it is facing?

I am not using Unity or XNA. Eventually, I will probably use OpenTK for graphics. But for the concept of a game I'm writing, I am using the console for keyboard input and visual logging of events, ...
0
votes
1answer
37 views

Using RPC's for movement of an object across a network [closed]

I've been building upon http://www.gamasutra.com/blogs/DarrelCusey/20130221/187128/Unity_Networking_Sample_Using_One_NetworkView.php At the moment when I spawn a sphere on the server it spawns on the ...
0
votes
1answer
84 views

How to implement mouse based movement in an RPG? (Java) [duplicate]

I'm making a 2D rpg and I want the character to move with the mouse, ie the user clicks and then the character moves to that location. How do I accomplish this?
0
votes
1answer
59 views

Spawning a Sphere and trying to move it [closed]

I've been trying to build upon a blog post on Gamasutra http://www.gamasutra.com/blogs/DarrelCusey/20130221/187128/Unity_Networking_Sample_Using_One_NetworkView.php In this I would like to spawn a ...
3
votes
2answers
170 views

How do I make a 2D race car turn smoothly? [duplicate]

I'm making a competitive 2-player 2D racing game for a school project. I'm struggling with the movements of my car: I made it a square for testing purposes and it can move left, right, up or down, but ...
0
votes
0answers
51 views

How do I make my character move during its animation?

I have an OGRE animation problem: I want to control a character with the WASD keys, but pressing W, the character only moves once the animation completes. I want to move the character with the ...
0
votes
1answer
63 views

3D Translations relative to 3D Rotations

I'm trying to program camera movement to be relative to camera rotation. (Forward is always forward, regardless of pitch, yaw, and roll) I want to be able to move forward, backward, left, right, up, ...
0
votes
0answers
64 views

isometric movement

I'm developing an isometric strategy game in flash using the Starling framework. I wanted to know what is the best way to move units about the isometric grid, and to render them the right way. Now ...
0
votes
0answers
65 views

How to move rigidbody player to its facing direction with AddForce?

How can I move a rigidbody to its facing direction? I've already tried this: rigidbody.AddForce (transform.forward * v, ForceMode.Acceleration); // v is a public float which gets a new value in ...
1
vote
1answer
349 views

Beginner: How do I calculate a vector?

I am trying to wrap my head around some concepts in a side project I'm working on. I'm struggling with how I can calculate a vector based on my character movement logic. Here are the relevant details ...
1
vote
1answer
54 views

Calculating aim point to pass through other point

We know for an object: Initial point O(x,y) Initial speed (s_x,s_y) Constant vector module aceleration (A) A point P(i,j) where we have to pass through in the future. We need: A point W(x, y) so ...
1
vote
1answer
71 views

Smooth anmiation with LibGDX

I want to move a enemy from its current position toward the mouse position in LibGDX. x, y - enemy position saveX, saveY - position where my enemy need to go(or mouse position saved at specific ...
1
vote
1answer
147 views

Mouse click movement

I need to make realistic human movement (3D) using mouse click. Get mouse click point using Raycast. Smoothly Slerp to LookRotation. Move transform.forward. Everything works fine, except I have ...
1
vote
1answer
108 views

Downsides of using this integration formula for movement?

So I read that Gaffron integration basics tutorial and noticed how the Euler integration method gives a small error over time. I implemented the RK4 and noticed that with constant acceleration, I ...
1
vote
2answers
70 views

Vertical Camera Movement in a 2D Platformer

I would like to ask about how vertical camera movement should be handled in a platformer in which the player changes his Y position frequently. For the past two days I've tried to adjust the camera ...
2
votes
2answers
77 views

How can I make an object move in four directions relative to its rotation?

I want to make a game object move in directions relative to the direction is facing. That is, If the user presses the "W" key the object goes "forward" if its presses "D" the object goes to its left. ...
-1
votes
1answer
102 views

Box2D platformer: Why does horizontal movement stop jumping?

I'm writing my sBox2D game character's movement code, but my implementation of jumping is failing: When I press the Jump key, the character jumps OK. However, when I press jump and another key (like ...
0
votes
1answer
114 views

Can't go above max speed with RigidBody2D.AddForce()

I'm having trouble making a character move faster than a certain limit using RigidBody2D.AddForce(). My game is a top-down 2D game (constrained to the x/y plane). I'm using a float 'MovementSpeed' to ...
-3
votes
1answer
73 views

What's wrong with my step-toward-target implementation? [duplicate]

I want to move a game object from its current position toward the mouse position. I wrote this Vector2D class to help me: public class Vector2D { private double xVect; private ...
2
votes
1answer
60 views

How can I move an object in a direction other than the ordinals?

I want to move a game object from its current position to the mouse position, but my current code only ever moves in one of the eight ordinal directions. In other words, I want it to move along the ...
1
vote
1answer
88 views

Interpolating rotated objects

I've finally got interpolation working to 'smooth' out movement, however it doesn't seem to work for objects that are rotating (around their own center) - when I try to do this, the objects in ...
2
votes
1answer
185 views

Implementing Galaga Style Enemy Behavior in Unity

I've been trying to work on a space shooter with the idea of having enemies behaving like it is shown in this video : https://www.youtube.com/watch?v=3p7u8uCR6yw In the video above, enemies fly from ...
-1
votes
2answers
116 views

how would I go on about making a movement system like mario party

main question how would i go about getting a movement system similar to the one they have on mario party only minus the dice roll things i have researched so I have been studying the uses for ...
1
vote
1answer
65 views

Movement on tile map when player is the size of 4 tiles, moving in 1 tile increment

I understand how to move a square around a tile map: you have a coordinate of the square (say the center), and if they player press the "up" arrow, just increment the y-coordinate by 1. Question: How ...
14
votes
3answers
3k views

How to avoid movement speed stacking when multiple keys are pressed?

I've started a new game which requires no mouse, thus leaving the movement up to the keyboard. I have tried to incorporate 8 directions; up, left, right, up-right and so on. However when I press more ...
0
votes
1answer
387 views

How can I make my player move in the direction the camera faces?

I have a 3rd person camera which can rotate around the player. My problem is that wherever camera is facing, players forward is always the same direction. For example when camera is facing the right ...
0
votes
2answers
46 views

Converting A 3D Rotational Vector Into A 3D Forward Heading Vector

I need to do a raycast which accepts a Vector3D StartPos and a Vector3D EndPos. I have available to me the characters position and the cameras rotation in 3D vectors. I need to somehow compute a ...
1
vote
2answers
114 views

Why does my ship look like it's going backwards instead of fowards? [closed]

I'm making an Asteroids-clone based on this tutorial. I'm stuck on the 5th part of the tutorial. For some reason my ship is going backwards instead of forward or it looks like its going forward, but ...
0
votes
0answers
30 views

How to interrupt movement where the model can lag behind

I have a movement system for my characters where the model is allowed to lag behind the character's actual position. In a way it is like the model is being dragged on a string behind the actual ...
0
votes
1answer
51 views

How to simulate random scope movement?

I want to simulate that random and soft movement that lot of games got (like BF3) when you use the scope of a sniper gun, so the question is how to achieve that.
1
vote
1answer
66 views

Gradually reduce speed

Basically I am working on following application of android version Party Games: Drinking Wheel For this I want to rotate wheel and want to stop wheel at specific point. But I want this with gradually ...
2
votes
2answers
131 views

How to move towards a point in 2D, stopping at obstacles

I want to do a 2D game, where you can mouse click anywhere on the map and the player will go there. If there is obstacle in the way, the player will go as close as possible to where you clicked ...
0
votes
3answers
106 views

Proper way for Player object to communicate with Map object?

I'm writing my first game (in javascript / node over websockets) and am running into a bit of chicken and egg problem, and am afraid how I'm doing it right now won't scale once the game gets more ...
0
votes
0answers
53 views

Monogame - How to make a character move automatically right when the game starts?

I am working on an infinite runner using Monogame and Visual Studio. I have a basic sprite that can move back and fourth. But I want to know how I can have objects, like platforms, moving ...
0
votes
1answer
130 views

Designing Character Movement Need Advice

(This game is written in C++ with GDI+ It's a simple side-scroller.) I am having a problem deciding on how I should handle player movement. Currently it runs at 20 frames per second (I just chose ...
1
vote
2answers
206 views

How do I create a knockback-movement?

I am a web developer new to game development, and with limited math knowledge. I am writing a character movement controller in Unity. The game has an isometric Diablo-like camera. The character moves ...
2
votes
1answer
230 views

Preventing diagonal movement

I was originally fine with diagonal movement but it's clashing with my sprite animation... public void keyPressed(KeyEvent e){ int key = e.getKeyCode(); switch(key){ case ...
0
votes
1answer
200 views

Smoothing Pathfinding on Tile-Based Terrain but Free-Roaming Player

I'm sorry if this is a long post, but I feel as though the details should help clarify gray areas. I'll try and provide a detailed layout of what I'm trying to achieve, what I have so far, and where ...
0
votes
0answers
72 views

SpriteKit - Make a sprite move similar t another sprite

I'm making a type of a platformer ( think super mario but in a top-down view style ) game and i want my main character to move with the platform it has contact with. So i used this: ...
0
votes
0answers
33 views

top down 8 directional movement - need help with collision [duplicate]

I have for some time now been strugling with movement in my game. I want a zelda like 8 directional top-down movement. I have tried different things, but non of them have been perfect. EDIT: ...
1
vote
1answer
71 views

How do you change movement to strafe

Right now my player can move forward and backward using case 'a':case 'A': speed.x = lx * 0.1; speed.z = lz * 0.1; break; case 'b':case 'B': speed.x = -(lx * 0.1); speed.z = ...
0
votes
0answers
78 views

Sometimes my game runs fine, other times it's shaky, why?

I'm trying to learn how to make games. I just did this very simple 3D game where you control a cube that shoots at incoming cubes. Sometimes I start the game and it runs smoothly from start to end. ...
0
votes
2answers
200 views

Problem with moving player through a secript by a set distance

I am currently trying to add a sort of "dash"-ability to my sidescroller. What I try to do, is to let the player press a key where a simple key-press causes the player to move quickly into one ...
0
votes
1answer
323 views

How to design enemies pattern in non-bullet-hell shmups in Unity? [closed]

I am making a top down shooter. Enemies will come in waves and attack in many different patterns (i.e. wave of 10 enemies flying in a elliptic curves, or a huge boss floating and shooting at you, ...
0
votes
1answer
46 views

Accelerated Motion

I'm making a menu for my game with SDL, when you click on an option a sub menu slides down and is shown, just sliding down is really boring, so I want it to accelerate(like if gravity was pulling it) ...
0
votes
0answers
108 views

sprite reset method not working in update thread(andengine)

I have sprite array with length of 8 and I am trying to reset sprites position in scene's update thread but it doesn't work. However I tried to reset sprites in sprites modifier listner which works. I ...