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
24 views

What is a good practice for deciding when to use transforms instead of applying force?

I was making several games. I don't understand when I should use addTorque instead of rotate. AddForce instead of position The latest game was a pinball game. I wasn't sure the best way to active ...
0
votes
1answer
37 views

Move unit 64 pixels at a time Unity3d

I'm new to Unity and am trying to learn how to use it. I'm making a 2D top down Frogger-esque game. I was wondering how you would go about making the player move x pixels per button press. I currently ...
1
vote
1answer
49 views

How to compensate for moving objects with client side prediction?

I'm implementing a game server that supports Star Control-like melee. So you have ships flying and shooting, with super simple velocity/acceleration/dampening physics to drive movement. I've read ...
1
vote
1answer
57 views

Unity question: When attaching my custom camera script camera shakes when player starts to move fast [duplicate]

Here is my player code. Rigidbody rb; Vector3 currMovement; public float jumpSpeed = 10; public float moveSpeed = 10; public float rotSpeed = 180; float distToGround; public float smoothTimePos = ...
-1
votes
1answer
46 views

Unity: When attaching my custom camera script camera shakes when player starts to move fast

Here is my player code. Rigidbody rb; Vector3 currMovement; public float jumpSpeed = 10; public float moveSpeed = 10; public float rotSpeed = 180; float distToGround; public float posSmoothTime = ...
3
votes
3answers
85 views

Does AddForce continue to add force indefinitely?

Does the AddForce method continue add velocity to an object forever? Does it need to be limited by another line of code? Sorry if it is too broad or too simple; I am completely new to programming and ...
0
votes
2answers
33 views

Updating GameObject Position in Unity 5

I have a simple Sprite called Player that has the follow components (Transform, Sprite Renderer, Box Collider 2D, Rigidbody 2D, Player Controller Script). In my Player Controller script I want to ...
-1
votes
0answers
23 views

How to move player with animation around shpere.?

I have a script modified by me. In my script i can not move my character with rigidbody.AddForce, Why i don't know but just play only animation not moving to forward. So I use rigidbody.velocity but ...
0
votes
1answer
79 views

How to achieve 2D ski movements similar to Alto Adventure?

I'm trying to achieve 2d movement similar to Alto's Adventure with Unity 2D. When grounded I want the character to slide alone the terrain parallel to the slope, but I want to be able to freely rotate ...
4
votes
1answer
70 views

Move Sprite in constant speed on squircle

I'm creating a game and i need to move a sprite on squircle path. https://en.wikipedia.org/wiki/Squircle i created the path using the equation : angle -= Gdx.graphics.getDeltaTime()*speed ; ...
0
votes
2answers
36 views

Autonomous robot - moving from 1 object to the next object

This question falls in line with my last question: Unity 3D - create autonomous moving robot in house + first person camera movement What I have I have a 3D model of a house; a first-person camera ...
0
votes
1answer
61 views

Unity 3D - create autonomous moving robot in house + first person camera movement

I have very, very little knowledge about programming or Unity. I have done some basic tutorials, but I want to try something harder. The thing is, I don't know where to start. If you find the time to ...
0
votes
1answer
65 views

How to decide between strafing, turning etc for lateral character movement? [closed]

I have been studying the character movement of many 3rd person games. But just when I think I have come to understand the conventions or found a pattern, it seems I come across another game which does ...
-4
votes
1answer
20 views

Problem in moving object on movement of mouse cursor in unity [closed]

I was watching a tutorial on how to move objects on mouse movement. https://youtu.be/7OJQ6MbHuvQ this is the link to that tutorial and below is the error I got while scripting. Pleas watch the whole ...
0
votes
1answer
28 views

Monogame movement Handling

I was curious if anyone could explain how I would be able to create simple movement handling in monogame. So far I have a red block which I tried to move by using a loop but that didn't take any ...
0
votes
0answers
21 views

character teleporting repeatedly into/above ground

I'm trying to make a HTC Vive Game in Unreal Engine 4. I'm not a programmer, so im new to all this. What i am trying to do is, make my character move with the thumb pad. I got the moving part ...
0
votes
1answer
40 views

Elastically Object movement in unity3d

I want to move an object towards the destination elastically. Currently I am using Vector3.Lerp it working to move the object, start with high speed and reached at destination with low speed but ...
0
votes
1answer
94 views

Moving object to point a to point b smoothly

I am working on a problem where distance between the point A and B or given and object of interest should move smoothly from A to B. I can control only control the speed of the object using this ...
0
votes
2answers
28 views

Moving towards and switching targets in Unity with collision

I have these nodes set up for a ship to move towards over time with out looking stops then repeats in a sequence. like so: 1 2 3 1 2 3 1 2... THE PROBLEMS i keep having either come from the ...
1
vote
1answer
40 views

Java- Trig based movement

I have been trying to create a smooth movement technique that would allow me to move in all directions, not just the 8 cardinal directions. I have tried to use this doing trig, and while the ...
0
votes
2answers
65 views

PYGAME: When i realese two directional keys together the player keep moving

I did the code this way to avoid the player to stop if a press two directional keys together making the moviment more smooth. It work well but when i realease two keys or more together the player keep ...
-2
votes
0answers
54 views

Motion related databasing with SVG and SQL [closed]

In my game I have two elements moving towards each other, meeting in the middle of the screen. Something like this: (the image will be two slowly converging mouth-like objects, but it's not finished ...
1
vote
1answer
57 views

Doubts on player movement strategy

What I want to achieve is the player moving to the touched position on a 2D grid-based game, stopping at the last reachable spot if the target position is unreachable. What is the strategy usually ...
3
votes
2answers
55 views

Bike game - following a road path

I am writing a game in java which has a bike riding down a road. I intend to add some obstacles on the road which are structures having a slope, which the biker must negotiate. In other words, the ...
8
votes
2answers
461 views

Guided Missile with Constant Time

I'm building a game with players and missiles. I want to fire a missile from P1 to P2. The missile should always take exactly five seconds to reach P2. The missile should also track P2. If P2 moves ...
0
votes
2answers
125 views

Smooth movement from point A to point B in a tile-based game

I'm currently very new to XNA, and I'm trying to get a grasp on movement. Currently, I have a function that checks for keypresses, and moves my character from point A to point B instantly: private ...
3
votes
1answer
147 views

How do I get A.I. that follows a list of movement commands to move smoothly in a tilemap based game?

This is for a school project so it's not intended to be sold/fun/or a complete game, rather just a demonstration of stuff we've learned without resorting to frameworks and stuff. My ai agents choose ...
1
vote
1answer
32 views

Circular Movement

if (Keyboard.isKeyDown(Keyboard.KEY_D)) { if (i < 360) { setX((float) (groundState.getX() + groundState.getRadius() * Math.cos(Clock.delta() * i))); setY((float) (groundState....
1
vote
1answer
83 views

libgdx - Texture not appearing sometimes

When I run the App the Ball moves sometimes downwards, but sometimes its not moving. I dont change anything on script. What I want is the ball should come from top outside of the screen, but when its ...
1
vote
2answers
102 views

Moving a character to a point without any floating point operations

So I'm writing an adventure game for MSDOS, just a fun challenge for me. I'm trying to get the character to walk along a straight line to his destination (either the next navMesh node or where you ...
0
votes
0answers
48 views

How to fix my issue with movement?

I am making a 2D tile game in Java, and I am having problems with movement, could someone tell me what I am doing wrong please? I am having difficulty in "calling" the function vectorFromKey in main. ...
3
votes
2answers
120 views

How can I make the ball in pong move even if no event is taking place in Allegro5?

I've been trying to make a pong game with C++ and allegro5, I found moving the ball around easy with SFML, but in allegro5 I don't know what I can do to move it around, right now, it moves but only ...
0
votes
2answers
31 views

Getting input from just one Axis at a time

I'm trying to make a CharacterController2D Script for a simple 2D TopDown game, but i was wondering, what would be the best way to disable 2-axis movement? just allowing one direction at a time (Maybe ...
0
votes
0answers
12 views

If I attach a RunAnimation to my Player and move it, the Camera starts to freak

If I make a RunAnimation for my Player in 2D, then there is one Spot it works and I can move perfectly but if I move my Player to a different position,my Player stucks in Midair and my Camera starts ...
0
votes
3answers
67 views

How do I flip Player in 2D Touch Movement?

How do i flip my Player in 2D when i got touch movement? I got Buttons to move but how do I flip the player now if i walk to the right cause my player faces to the left..? here is my Player Script: ...
2
votes
1answer
75 views

Correct order of entity updates and collision detection

I'm trying to simulate a number of units walking in a single file. My update loop looks like this: for each unit: n = compute next position if n is empty then move to n If I start the loop ...
0
votes
1answer
58 views

Moving script not working after SetActive/Pause change

I have a pause menu for my game which instantiates a texture and sets a text frame to active and slides both objects onto the screen using the code below: Instantiating the menu texture and ...
1
vote
1answer
137 views

Unity 2D Diablo style movement

I've made a totally new scene for a 2D mobile game. I placed a sprite on the center of the screen and attached the following script onto it (this is basically a diablo-style click-to-move control ...
1
vote
3answers
64 views

What is easiest way to move towards and along the edge on a hex grid?

I have a hexagonal grid with variable radius. My entity can move exacly 2 hexes per turn. How should I calculate next step towards border and afterwards travelling clockwise around map? Preferred ...
0
votes
0answers
34 views

Preventing a NavMesh agent from moving Diagonally?

I'm currently working on a topdown game that uses 3D models. I am planning on using the NavMesh system in Unity to handle the movement of my NPCs, however, the NavMesh agents move diagonally when ...
0
votes
0answers
64 views

LibGDX - Player Movement Flickers

So, I was programming a very simple LibGDX game, so I decided to include a player class into the program. Once I did that, the players image started to flicker/stutter while I moved it. Here's the ...
0
votes
1answer
191 views

How to make my character double jump in unity3d using CharacterController?

I can now control my character in air, I used Unity's CharacterController.Move docs, but now I need to make my character double jump. Here's the code. public class PlayerMovement : MonoBehaviour { ...
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 ...
0
votes
3answers
171 views

Move Camera When Player Move C#

i developing side Scrolling endless Game. i want to Change X Axis of camera as player moving to Right. and i almost Done That. but the problem is when move Camera to the Right then its look so stiff ...
0
votes
0answers
20 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
60 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 ...
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
43 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 ...
3
votes
1answer
218 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 ...