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
1answer
160 views

Unity 5.2 default 3rd person controller makes character fly upwards when moving forward

I'm new to Unity and already dealing with a problem.. using the default third person controller script I am trying to move and animate player. But I have a problem that as I try to move the character ...
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
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 ...
0
votes
1answer
158 views

Continuous Jumping Cycle

The script makes a GameObject jump using realistic gravity and reach a specific target. The GameObject jumps relative to the target, thus adjusting its trajectory. It also works while the target point ...
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 ...
0
votes
1answer
154 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 ...
-3
votes
2answers
254 views

Random AI Movement

So I'm creating a zombie game where the zombies are passive and just walk randomly all over the area when player is not near. My question is: how would I make zombies move randomly? I code in C#. ...
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 ...
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 = ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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
0answers
92 views

Character Movement and Collision with Ragdoll Rigidbodies/Colliders?

I have a player character that I'm moving with a character controller script and it is moved by applying velocity to a Ridigbody. This works when I have a rigidbody component on the player but my ...
3
votes
1answer
43 views

How to decide the direction of movement, when navigating a fixed path in a 2d overworld?

Suppose, I have a 2D overworld like in Super Mario Brothers 3, but without junctions or intermediate nodes. Only a single, contiguous path of level nodes, which should be navigated with the arrow ...
2
votes
2answers
170 views

How do you avoid lag with Three.js and mousemove?

I'm trying to create a browser moba-like game using three.js. I'm using WASD for movement and the player rotation follows the mouse with mousemove then lookAt() the intersection. The problem: As I ...
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; ...
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 ...
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 ...
1
vote
0answers
36 views

SDL and smooth transition between changed movement direction

I have an object at position (x,x). Using SDL keyboard events every time the user presses one of the arrow keys the objects is to be translated (via a glTranslatef() call for the x and y axes) by a ...
2
votes
1answer
58 views

Isometric Mouse Camera Panning

I am building an isometric game environemnt and i want to be able to pan the camera around the map by holding the right mouse button, can someone talk me through the logic for this please, i have made ...
3
votes
1answer
368 views

How to get direction and velocity of movement of an object dragged with the mouse in Unty (C#)

I have an object that is dragged by the mouse (X and Z positions) over a table, with the following simple code: Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if(Physics.Raycast(ray, ...
1
vote
0answers
25 views

UDP - PlayerPosition updating - SequenceNumbers

I'm trying to implement a reliable UDP system, which sends and receives player positions. In my opinion, there is a mistake somewhere in the code, cause it's still moving the character back (not far, ...
2
votes
1answer
96 views

2D Change Velocity Based on Distance XY While Moving Parabolic Arc

What I'm trying to achieve is that the entity moves in a parabolic curve, and no this has nothing to do with gravity before you ask. I give the entity a target position which it should move to, but ...
1
vote
0answers
80 views

Matinee movement track on multiple actors

I have some different actors (all spheres) that i want to move along a path (circular) and they also need to roll when they are moving, so i tried this using matinees movement track and attached all ...
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 ...
0
votes
0answers
123 views

Unity - principle of moving GameObjects / AddForce vs MovePosition vs position.transform

having generated a Mesh with MeshColliders as Terrain i want to move gameobjects in a RTS way along the map. i searched the Web alot, but iam having troubles figuring out HOW to move my Character ...
1
vote
1answer
184 views

How do I quantify the curvature of a touch swipe?

I'm implementing a touch controller for my game. I am attempting to imitate Tiki Taka Soccer's "ball shooting" controls (gameplay video), where the curvature of the player's swipe affects the curve ...
6
votes
1answer
135 views

How do I set an object's speed to arrive in X seconds?

I want to move an object to a point in the game world, I have the distance value which is far the player should move. I want to complete the movement in X seconds. I have tried many equations and ...
1
vote
1answer
108 views

Transform.forward having problems after rotation

I have this script, void Update () { float pitch, yaw, roll; pitch = Input.GetAxis ("Mouse Y"); yaw = Input.GetAxis ("Mouse X"); roll=Input.GetAxis ("Roll"); ...
1
vote
1answer
127 views

How do I move a sprite with out the sprite leaving a trail? [closed]

NEW IMAGE NO SPRITE WITH : if(q>=15){ screen.clear(0); screen.render(Art.sprites[i][0], 20 , cx); i++; movement(); cx+=1; if(i>=3)i=0; ...
0
votes
0answers
70 views

3D Player/Character velocity/acceleration/friction/movement

I'm in a bit of a pickle and I'd sincerely like anybody's help. I'm working on a 3D platformer similar to Crash Bandicoot and I'm a little bit confused on how to set up the velocity and acceleration. ...
1
vote
0answers
33 views

Collision detection for multiplayer game with MatterJS

We are developing JavaScript multiplayer top down game where characters can move freely and collide with each other. We are rather weak at mathematics and physics, luckily we don't need much, just ...
2
votes
1answer
255 views

How to implement view bobbing?

I'm developing a First-Person shooter game. Everything is just fine but I've a little problem with my camera moving. My FPS camera is moving smoothly! But the camera should move like a human is ...
0
votes
0answers
54 views

Troubles in moving objects

Hi everybody! Actually, this is not a game, it's a gravity simulation program; however, people on StackOverflow told me to put questions about this program here, since it's a program I'm making to ...
0
votes
1answer
59 views

libgdx automove Actor does not work

I am trying to make my sprite start moving from the moment it is created and do its animation. It draws on the screen right and animates but doesn't move. It should start moving towards the direction ...
0
votes
0answers
53 views

Unity 2D - GUI box not moving with game object on X axis

I am trying to create a health bar above a spaceship in a 2d spaceshooter. Right now I just need to create a box and move it with the player. I found WorldToScreenPoint() which should work althought ...
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 ...
0
votes
1answer
15 views

characterController reference issue

I am trying to move my character to point that taken from mouse position. here is my code: private Vector3 hittedPoint=Vector3.zero; if (Input.GetMouseButtonDown (0)) { Ray ray = ...
1
vote
1answer
72 views

Basic game loop, what does Update() and HandleInput() mean to you?

I have been developing a game and until now I have been handling input like so: Player presses a key HandleInput() acknowledges a key is pressed calls a function within the Player class which ...
0
votes
1answer
45 views

Camera will not move between given points, stuck at first given point

[EDIT: Working code added] [Original question] I'm putting together a "raid cam" or "overview cam" for a given map in my shooter for an observing player to use to fly down a given preset path (to ...