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
92 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
153 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
84 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
32 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 ...
1
vote
0answers
48 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
38 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 ...
0
votes
1answer
39 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 ...
1
vote
0answers
26 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
47 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
83 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
22 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, ...
1
vote
0answers
43 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 ...
1
vote
1answer
74 views

Player launches into air when hitting steep slopes

I've been debugging an issue where when my player is moving forward at high speeds (I have configurable movement modes for an overview/overwatch mode) if they are in walk mode and hit a steep slope ...
0
votes
0answers
88 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
110 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
130 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
78 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
91 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
51 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
24 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
82 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
52 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
0answers
48 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
1answer
14 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
67 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 ...
2
votes
1answer
166 views

Player takes too long to start walking

I'm new to Unity and after doing some tutorials and reading documentation from Unity, I've started a test project. The game is a 2.5D platformer and I wrote the PlayerController; it looks like this: ...
0
votes
1answer
43 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 ...
-2
votes
1answer
40 views

How to manipulate unity camera in a C# script? [closed]

I am new to unity and i'm trying to move the camera to follow the player, but everything i tried won't work. Please explain what each step is and show code. I want to add to its position not use ...
0
votes
0answers
42 views

Rotate Object inside room according to wall

I have a room. I am trying to move an object whenever it collides with a wall. It's working properly except at the edge of two meeting walls. At the edge it's flicking. I tried to move the object when ...
1
vote
2answers
421 views

Best way to constrain character to a path?

I'm in the process of developing a level-based runner for mobile phones, and I've hit a wall when deciding which method to use to get the character to move through the level. Basically - I need my ...
0
votes
1answer
47 views

Stop player following cameras cameras direction

Okay I'm not going to go to much into it but this is what I need my script to do. The way I have my controller set up is that the camera looks to the side of the player a little bit. I use this for ...
0
votes
2answers
92 views

Choppy movement

So, I'm trying to write some code in C# XNA to make an enemy move in a random direction for 0.5 seconds, then switch direction and once again move for 0.5 seconds. However the problem I've discovered ...
2
votes
2answers
195 views

Best 2d AI movement system

I'm creating a top-down rpg (no tile-based) using libgdx. Now I need to make enemies move on map with obstacles. What is the best approach to realize that? A*(I think, if enemy see player, he should ...
1
vote
1answer
116 views

2D grid based game merging boxes

Basically what i have at the moment is a tile based game with a grid containing a number of colored cells. this is what i've done so far The prinipal idea of the game is that the user has to ...
5
votes
1answer
488 views

Why do my game objects jitter when moving the camera?

I'm moving from Qt Widgets' QGraphicsScene to Qt Quick's QQuickItem for rendering my game objects. One of the things this involves is setting up a scene and the view onto that scene, as this was ...
0
votes
0answers
29 views

Platformer Tile Map Collision Help

I've been working on a small platformer as a simple project but, I'm having troubles with my collision detection. What I want is that as the player falls due to gravity, it will stop when it touches ...
1
vote
2answers
59 views

On key press, spawn a collider where my player is facing?

I'm trying to create an attack mechanic to my player hero in my 2D Tower Defense game. When I press the Q button I want my hero to do an animation and spawn a temporary collider shaped as a cone at ...
2
votes
2answers
885 views

How to check if grounded with rigidbody

Does anyone have a better way to make an object with a rigidbody check for ground and then jump, right now I wrote a script where a raycast is cast downwards and it checks for distance but then I ...
2
votes
1answer
92 views

How do I calculate the position of a vehicle moving between tiles, over time?

I'm working on a small multiplayer game where players can create cities, and these cities will be placed on what's called the "world map." The world map is basically a giant coordinate plane made up ...
0
votes
1answer
29 views

Polar movement towards cursor sfml and c++

I got smooth movement down moving based on the window but I wanted to see if I could move my sprite to my cursor when I pressed w instead of just in the -y direction but everything went wrong right ...
0
votes
1answer
46 views

Cube bounces back with rigidbody and script in Unity

I have Unity 4.6.1 and I added a cube with a moving script and a rigidbody. The script is: #pragma strict var speed : float = 10.0; function Update () { // Is the user pressing left or right ...
2
votes
4answers
751 views

Smooth Camera Follow

I am using a fixed static background. I have a gameobject(Current ref. image) which is moving with the help of waypoints. I have made camera to follow the Current. The camera is stuttering while ...
1
vote
1answer
43 views

Multiple input not working properly

I have 3 different buttons, one for each action. I want to be able to jump and walk at the same time, but there's a little problem. jumpButton doesn't work while I'm pressing leftButton or rightButton ...
1
vote
1answer
1k 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, ...
2
votes
0answers
88 views

360 Degree Snake [closed]

I'm using Unity / C# to make a variation on a 360-degree snake game, but I'm having trouble just getting the movement of the tail right (I have a similar problem as in this question: How To Approach ...
2
votes
1answer
257 views

Implementing character movement using real physics

This is the first time I'm seriously developing a game so apologies if I'm missing the obvious. In my 2D platformer I adopted Box2D since it seemed like a natural solution to model gravitational ...
0
votes
0answers
38 views

xna multiplayer movement

So I have a tcp sockets network setup with the ability for clients to connect to the server. I'm currently trying to do movement. And iv discovers that tcp is terrible for sending out the x and y ...
1
vote
2answers
214 views

Game networking, limiting amount of movement packets

I have been developing a server/client model for a game project I am working on. Everything works great, client side prediction works, server reconciliation works. Basically, the character can move ...
-1
votes
1answer
186 views

C++ SFML and Box2D: Move world or move player?

I'm currently making a top-down shooter game and it's my first time developing with SFML. I came across and issue and I want to know if there is a better way to solve it. I need to get the "camera" ...
2
votes
2answers
115 views

Equation for exponential deceleration so the objects “stops” at destination

Let's say my ship's velocity during deacceleration phase is given by: v(t) = v0 * exp(-k * t) where v0 is the speed at the time of starting deacceleration and k is arbitrary constant. My problem ...