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

0
votes
0answers
16 views

Move car with script [duplicate]

How would I go about writing a car script in C#. Is there anything special I would need to code. Or is it simply if pressed certain button, Rigidbody.AddForce() or transform.Translate(). My question ...
0
votes
0answers
39 views

Adding a 2d collider causes incremented movement of a child, how to fix it?

I have 2d game, with a parent object with two sprite children, a man moving up and down with a flamethrower. Currently having only the movement script and rigidbody, I can move the parent easily with ...
4
votes
1answer
199 views

Creating a Roguelike game in C

I'm trying to create a simple rogue-like game in ncurses in a C program. The idea here is that, I'd parse a file like this: 10X10 ds2 de2 dw5 12X12 ds3 de2 dw1 14X14 ds5 de1 dw5 10X10 ds5 de3 dw5 ...
13
votes
2answers
2k views

Movement appears to be frame rate dependent, despite use of Time.deltaTime

I have the following code to calculate the translation required to move a game object in Unity, which is called in LateUpdate. From what I understand, my use of Time.deltaTime should make the final ...
0
votes
0answers
19 views

JavaScript — Unity Movement Bug

Hello fellow programmers ! I have been working on a game lately and It's going pretty good. Today I decided to make a new car for it since it's a racing game. When I was modelling the car I ...
0
votes
0answers
56 views

How to make this 2D jumping animation smooth in XNA?

I am currently developing a game where I have a sprite that its objective is to jump over boxes coming at it. I know that you have to change the Y values. When spacebar is hit, it goes up but then I ...
0
votes
0answers
42 views

storing hexagon-based (x/y) movements in a database

Im developing a hex(agon)-grid based game. The game is turn-based. Players move stuff on the map and they need to be allowed to issue movement-orders. Units move a certain amount of movement-points ...
0
votes
0answers
31 views

What can I do to improve my movement?

I'm starting with my first prototype, I can move my player and jump, but it doesn't feel very good indeed. I've made a gif to show it. This is my script: using System.Collections; public class ...
0
votes
1answer
41 views

Character doesn't move. I think I've tried everything, so I'm asking [Unity3D]

The animations are playing fine, however I can't manage to move my character. My script: using UnityEngine; using System.Collections; public class PlayerMovement : MonoBehaviour { public float ...
1
vote
3answers
146 views

Getting sprites to move exactly the same on different devices

Background When moving a sprite along the X axis, this is my code: spriteXReal = spriteXReal + (spriteXVel * dt); //.5 would be halfway point of, 1 would be right hand side screen etc... ...
1
vote
1answer
493 views

Multiplying by delta not giving smooth movement

I started working on my first proper game but reached a problem straight away. In short I have a game that runs most of the time at 60 fps. ( I am using Libgdx a popular Java framework) but my game ...
0
votes
1answer
127 views

Libgdx Delta time stutter?

Alright, so I want my guy to move, I simply use this code. velocity.y = speed; Same goes for velocity.x Thing is, the lower the framerate the slower he moves. But, if I add delta time, the player ...
1
vote
0answers
63 views

2D Platform physics system with deltaTime

I'm implementing my physics handler in my own 2D "Platform" game. My main problem is that when the timestep ( deltaTime ) changes, maybe to some tiny lag spike or something like that, the running ...
0
votes
2answers
76 views

Annoying snag when moving with dx and dy JAVA

I am currently using a keyAdapter with detectors and when I move I change the value of dx and dy respectively. However if I move left then right or up then down quickly, the sprite won't move in the ...
1
vote
0answers
110 views

Why do characters only move in 4/8 directions in top games? [closed]

In many top down games, like Zelda (4 directions) There are only 4 or 8 possible directions. Why is this? Is it a design choice or a technology limitation? I can't think of any reason that even ...
0
votes
2answers
79 views

Moving a ship forward from rotation

I am making a simple space simulator, where the player can control a ship using 2 controls, one for pitch and one for bank. The ship is properly rotated but I cannot figure out how to make the ship ...
1
vote
1answer
76 views

Unity C#: Game Object Movement Issue

I'm trying to move a game object within a set x and y range. I thought the code below would work, but it does nothing. The idea is the player controls the platform and tries to move under the ball. ...
4
votes
1answer
225 views

Doom-style 2.5D Movement Animations

I've started working on a demo for my 2.5D game. For a basic scene I figured I would just use the good old fashioned doom sprites textured to a double sided plane. Simple enough. But I've been ...
1
vote
0answers
28 views

Movement for Box2D Bodies

I'm having trouble wrapping my head around something that should be relatively simple. I'm making a breakout clone using LibGDX and Box2D. I'm also using the Ashley ECS. For movement with bodies, I ...
6
votes
2answers
218 views

How to apply friction vector to acceleration in top-down 2D game?

I'm making a top-down view 2D RPG game, meaning the player can move in any direction on a 2D plane, and I'm trying to implement a somewhat realistic non-orthogonal acceleration/friction physics model ...
1
vote
1answer
243 views

Gravity and Jumping in Clickteam Fusion 2.5

So I'm currently building a bare-bones functioning game that involves simple platforming. Quite literally a box moving left and right and jumping. I'm using Clickteam Fusion 2.5, and I know there's an ...
0
votes
1answer
52 views

Z - Axis value is changing if I move the Game Object in X - Axis in Unity

I am on a small game project . Everything was just fine , but now I have some wired problem . That is Game Object movement . If I move the game object in X - Axis using the gizmo , the value of Z - ...
1
vote
0answers
64 views

Movement algorithm for Pocket Civ game

I am developing a Pocket Civ game engine. (You can check the process at www.pocketciv.com). Basically there is maximum of 8 Areas (round nodes in the pic) that have Tribes (number inside the node). So ...
4
votes
1answer
181 views

Moving a character based on a list of Vector 3's

I have a client server scenario. On the server there is an AI character who chooses a random point on the map and pathfinds to it, when at that point it chooses a new point and pathfinds again etc. ...
1
vote
1answer
141 views

Working out velocity/time based on physical pixels moved

In my game I integrate like so: (Please assume all variables to be declared) sprite.xTimeInSeconds = 5.0; //Time in seconds it should take this object to cross screen sprite.xVelocity = ...
2
votes
1answer
139 views

Architecture for game character movements with user input and a finite state machine

I have a JavaScript canvas game setup using Phaser framework. When I first made my character able to run, jump, and crouch, I used lots of if/else conditions and ended up with an ugly, buggy mess. I ...
0
votes
1answer
70 views

Ball Speed is not increasing as per code

I am working on small project , but now I have a problem . The problem is The Player speed (Ball speed) is not increasing as per the code . In the beginning ball speed increases , but as the time ...
0
votes
0answers
79 views

Unity Player Smooth Left - Right Movement

I am learning Unity 3d . Now I want to move the player object (The Ball) , Left and right by Left Arrow and Right Arrow key . I want smooth movement when the player goes left , but I don't know how to ...
5
votes
1answer
930 views

Character Movement in 3D games

I'm either not searching correctly or there is really not a lot of material on Character Movement in 3D games. I'm mostly interested in how people usually implement character movement in games like ...
1
vote
1answer
42 views

Efficient movement of units to different points with different speeds

I have a series of units and have been given 2d points that they must go to. However they are free to go to what point they like as long as all the units get to all the points in the quickest time ...
6
votes
1answer
501 views

Walking on a sphere

I'm working on a game which involves walking your character on the surface of a sphere. Using the answer to Arbitrary Rotation about a Sphere, I've written my code as: if (game.isKeyDown(37)) { // ...
0
votes
1answer
153 views

Best way to interpolate player movements in a very fast paced Unity game?

In my Unity online multiplayer game players move very fast and I currently use Lerp to interpolate between their last position and current position: transform.position = ...
-1
votes
1answer
46 views

How to optimize movement script using CharacterController component?

I've made a very basic character controller using a CharacterController component. I'm still a beginner so I keep learning new things. My problem is how to optimize my controller script. Also, I would ...
1
vote
1answer
147 views

How to move the generated polygon horizontally in openGL?

I am trying to develop a small ball game in OpenGL where rectangular bars of random height is generated and moved towards left and there is a ball which should be moved up and down(like jump action) ...
9
votes
1answer
139 views

2D Physics: storing previous position vs storing velocity

I saw a number of 2d game tutorials and books where previous position of an object was stored in state instead of velocity vector. Velocity is then calculated each frame as a difference between ...
0
votes
0answers
65 views

How to get the angle an object is travelling at

I'm trying to figure out how to get the angle an object is moving at, but have ran into a few problems. My player object is moved by rotating the entity left and right by using the left and right ...
11
votes
3answers
750 views

Unity - How to move a ship realistically to a point in a 2D top-down game

i'm trying to move a sailing ship to the point where i clicked with the mouse. this movement should be realistic (oar at the back where the ship moves around) so if the mouse click is left and in ...
2
votes
1answer
60 views

Particles to Denote Movement in Space

I'm currently working on a WebGL project to realise an idea I've had for some years. On my desk is book on making a space sim written 15 years ago. There I found some algorithm for particles in ...
1
vote
2answers
206 views

Enemy moving towards Player in a 2D setting?

i want to apologize if this seems so basic, but I'm having trouble having an Enemy move in my Player's Direction in a 2D Top-Down game. I already saw a lot of other answers but they all use the ...
2
votes
0answers
147 views

unity lag while moving a sprite

I'm trying to build a 2D game for android and after I finished developing the game I noticed that there was lag present when moving objects around. I tested it on a phone much more powerful than my ...
0
votes
1answer
71 views

Rotate sprite direction Cocos2d

I want that my sprite go always forward, and you can only control his direction moving right and left (on 360 degrees). I don't know why, but the movement it's senseless. The constants to move and ...
21
votes
3answers
3k views

How can I move an object in an “infinity” or “figure 8” trajectory?

When I want to move object around point I do: point.x *= cosf(timer.timeElapsed); point.y *= sinf(timer.timeElapsed); How to make point move on eight or infinity sign trajectory?
4
votes
2answers
189 views

Movement with Vector Math

After reading This SO post on Vectors, I'm still pretty confused on how to use vectors to move my entities at any angle. The SO post assumes only 90 degree angles: if up pressed: direction = ...
3
votes
1answer
206 views

Bouncy Ball stops without enough force

I am building a 3D Pong clone and want to implement a frictionless bouncing ball. These are the steps i took: Create a box in which the ball can bounce, consisting of standard cubic objects. Create ...
1
vote
1answer
83 views

How to make an enemy projectile head to the player's position with constant speed

How can I dynamically set the movement speed of the X and Y of the projectile so that it moves at a constant speed when the projectile heads at the player's position? I know this has something to do ...
3
votes
1answer
101 views

Vector3.MoveTowards on y axis only

I am making a final boss fight area and it has multiple platforms that go higher and higher up, I need the boss to follow the player up and down. I have a script that has the boss the follow the ...
1
vote
1answer
97 views

Acceleration problems

Im trying to make a car game, but i cannot get the acceleration code right. With this code: if(gas){ speed += 3; }else if(break_ && !(speed < 6)){ speed -= 3; ...
0
votes
2answers
329 views

Using Unity's `transform.translate()` to translate relative to an object but only using two axis

I'm using transform.translate() to move an object around the world space, relative to the camera that is following it. The camera has an angle of 23 degrees on the X axis. The problem is that when I ...
2
votes
1answer
97 views

Move two different objects to two different destinations so they arrive at the same time without using lerp

I might be missing some simple thing but I'm not I am able to wrap my head around this. Normally, if I want to move two objects to different positions so they arrive at the same time I would use a ...
0
votes
0answers
41 views

Moving a RigidBody via camera vector?

I have a third-person/first-person controller that moves a character via rigidbody. In 3rd person this looks alright but in first-person this movement is sub-par because the camera jitters and one ...