# Tagged Questions

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

89 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 = ...
52 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 ...
20 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 ...
67 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 ...
48 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 ...
26 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 ...
76 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 ...
20 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 ...
34 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 ...
44 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 ...
84 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; ...
76 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 ...
30 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 ...
19 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 ...
34 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 ...
41 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, ...
21 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, ...
30 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 ...
21 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 ...
61 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 ...
50 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 ...
80 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 ...
120 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 ...
48 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"); ...
76 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; ...
33 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. ...
18 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 ...
54 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 ...
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 ...
34 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 ...
38 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 ...
31 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 ...
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 = ...
61 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 ...
42 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 ...
141 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: ...
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 ...
40 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 ...
163 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 ...
76 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 ...
80 views

### Determine facing direction mecanim 2d movement

I'm using this script to move my character in my 2d world: public float speed; //Movementspeed public Rigidbody2D rbody; Animator anim; void Start () { rbody = ...
453 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 ...
49 views

### Unintentional slight arm position change

In the scene I have a capsule with a camera parented and a looking script so when I look down or up the weapon slightly moves forward and then moves back when I look straight forward. weapon when I ...
27 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 ...
45 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 ...
67 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 ...
85 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 ...
326 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 ...