# Questions tagged [movement]

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

1,043 questions
Filter by
Sorted by
Tagged with
35 views

### Why do my entities have jittery movement, where their velocities fluctuate wildly between frames?

I'm writing my own simulation for some robots. I want to utilize friction, acceleration, velocity calculations. Currently, my code looks like this: ...
50 views

### Why do I have to freeze my player's x and z rotation to make my player movement work and why does my camera stutter when colliding with things?

So I have an empty object called player with the PlayerMovement script and a rigidbody. I have the main camera and player visual as childs of it. The movement works ...
50 views

### How can I implement actor velocity / acceleration with fluid changes if direction changes are small, and abrupt if the direction changes are large?

I hope the question title makes sense. I haven't been able to google for an answer because I don't know what the correct terminology I'm looking for is. Basically, I have an actor / enemy / game ...
1 vote
23 views

### How to make AI Character move towards Actor Object

I have in my scene an AI Character and Actor Object, but the character won't move no matter what I've tried. You can see the current code with debug statements. I'm not sure what I'm missing because I'...
43 views

### How to make smooth movement for a tunnel traveling music game?

I'm creating a music game where the player travels inside a tunnel and can create twists and turns while listening to music. Here's a video showing what it currently looks like. I'm looking for advice ...
7k views

### Diagonal movement is faster than horizontal or vertical movement. How to fix?

When using Horizontal or Vertical input keys, the the movement is normal. But when trying to move diagonal, multiple keys are to be pressed, and the speed just stacks up. Yes there are many answers ...
40 views

### Is it possible to design character movement system with Bezier Curves?

For context, I'm trying to create a really dynamic and fast character. That can suddenly move slow, fast, zap into places, dash, and hover in place. Say that I want to make a character accelerate a ...
1 vote
739 views

### Vertex Displacement Shader Graph With The Camera Moving Issue

I have a foliage sway shader, that works well. But when the camera moves the vertex displacement stops: And the weird thing also is that if I move the camera to the right nothing seems to happen, ...
1k views

### LibGdx Positioning the camera

I've been following some tutorials about libGdx and I've tried to create a 2d platformer but I've got stuck at how would be the right way to make the camera not go out of the screen when the player ...
2k views

### How can I move a vehicle using speed and steering angle?

I want to drive a vehicle in x and y coordinate area with range from (0,0) to (6000,5000). I am using Visual Components (using Python API). On input I have speed data and steering angle of wheels ...
70 views

### How to make camera follow player on Y+ axis only

My player is jumping on sticks, endlessly going upwards, and if they fall, it's game over. I want the camera to follow the player only when they move up (ie. only on Y axis), not down. If they move ...
3k views

### How to get the actor to follow the mouse while clicking and holding?

I am trying to do the top down project from scratch. I can already get the actor to move toward the mouse click: Only I need to keep clicking several times to change its path and keep walking ...
2k views

### Using UPawnMovementComponent to control a Pawn with Keyboard sharing code between Pawns

I've just started to learn Unreal and reading the tutorial Components and Collisions I have found that they use the UPawnMovementComponent to control their ...
60 views

### Circle to Polygon & Circle to Circle Velocity Resolution

I am working a 2d physics engine. Polygon to polygon collision and velocity resolution works without issue, but I am struggling to get working circle to circle and circle to polygon velocity working ...
36 views

### How to move a Rigidbody forward using Bullet Physics

I'm currently developing a character controller for my game framework, and I'm utilizing the Bullet Physics engine for the physics simulation. In the process of adjusting the velocity, I aim to enable ...
1 vote
703 views

### Simulating movement input in server-side, with different tick rates

I'm designing a simple MMO game server with the help of ENet (reliable UDP library) and the Godot engine for client-side. I've read tons of articles, guides, stack exchanges questions regarding ...
3k views

### How hard to brake to perfectly smoothly reach the destination?

Goal I want the get the required minimum deceleration to perfectly smoothly reach a target. (The car's AI should know how hard it has to brake to be the perfect valet.) Research "How can I ...
413 views

### Interpolation on Rigidbody2D not working

I'm trying to achieve smooth movement for a ball. I seem to be failing to achieve this and now I've created a sample scene, which shows my setup from the game and the problem exists in that sample ...
592 views

### How to rotate a 3D object based on stick Input and the normal of the ground's surface?

I am making a game where I want to view an object from any angle and use an analog stick to rotate it according to this input and the surface the object is currently resting on. Here's a visualization ...
1 vote
945 views

### How to use SmoothDamp with speed?

I have a moving platform which is being moved like this: ...
1k views

### Unreal Engine 4 AI Character Pawn Entirely Unresponsive to Movement Commands

I'm new to game development and to Unreal but I cannot for the life of me get my AI character pawn to move at all using any method I know. I'm developing a 2d Sidescroller game using a Tilemap. I have ...
104 views

### My CharacterBody3D Is getting blocked by ramps that act as walls

To summarize, my ramp is acting like a wall even if it is created to have a collision and mesh that fits its shape. I have tried: Putting the max angle to 90 using different ramps (CSG & mesh) ...
110 views

### Max velocity for smooth deceleration to destination

I am able to update velocity of my agent every 0.5 seconds. My agents max speed is 5f/s and max acceleration/deceleration is 2f/s. I know how far away I am from the destination. How to determine ...
61 views

### How do i put an entities x,y and z coordinates to a variable(?) in Blitz3D?

I'm making a TEST 3d platformer where the camera follows the player from above. Normally I would make the camera move at the same time when the player moved, for example: ...
56 views

### How to add gameTime to movement with acceleration and diagonal normalization?

I recently started rewriting my engine from scratch, because the old one was my first attempt and the structure was very messy. Everything has been going great, but now I'm being held back by some ...
19 views

### Duplicated the player scene but only the running animation is not playing

First time asking a question here, so hopefully it goes well! So, I had a player scene set up with a custom state machine, for now handling the idle, run and jump stages, currently set up as nodes: ...
77 views

### How can I efficiently load and unload regions of a world as the player moves?

I am creating a game with infinite terrain. Sections of the terrain are broken up into regions of fixed size for handling (similar to chunks in Minecraft). I would like to load and unload them as ...
1 vote
78 views

### Flying AI shakes when chasing and avoiding obstacles simultaneously

I've got a problem with my flying AI in Unity. When it just chases a target it's ok, but my system contains avoiding obstacles so when it starts to do it, it shakes weirdly. As I understood using <...
68 views

### Sprite chasing a target using move_towards_ip does not move

I'm trying to get a turtle sprite to chase a falling algae sprite utilising Pygame's inbuilt functionality. I have spent many hours reviewing questions and answers and suspect I'm missing some ...
3k views

### How to move in 3D space in first person mode?

I have a Camera with Vector3 and also the camera has an angle. If I use this: hero.position.x += speedX; hero.position.z += speedZ; works great but as soon as I ...
56 views

### Determining meters per second in scaled terrain

I have a terrain with a width of 199 and height of 99 and I'm scaling this train by 500. What would be 1 meter in the new terrain, would it be 500? I'm trying to move my character in meters per second ...
99 views

### How to make redirected player movement respond to same key?

I have a 2d game (Godot 4) with different rooms with portals to go between them, and some portals redirect the direction of the player while still holding the same key. I have that working so far, but ...
1 vote
2k views

### What is a good approach to dynamically change actor Position?

In my card game there are 2 players with each player having a hand(a ListArray of of Cards.In this case its ...
2k views

### How do I prevent camera jitter when rotating the player?

This is a problem that seems to have no reasonable answer anywhere around, yet is a commonly needed aspect of developing game mechanics. Context I'm developing a traditional 3rd person character ...
206 views

### How to code glider movement in 2D? (Godot 4)

So in Minecraft, you have the elytra. When you look up, the character moves up. When you look down, the character moves down. The speed you move forward depends on the angle you are moving. I want to ...
52 views

### Why are the transform game objects moving away from the snail when they are swapping their direction?

I am making a game in which I created a character (main player) and another character(snail). Now the snail will move on the ground, when there is no ground detected it will change its direction. I ...
1 vote
47 views

### Move UI element by a specific amount relative to current screen resolution

I want to achieve the following: At some point in the game, the UI Image (dashed rectangle) should shift towards the right edge of the screen (black outline rectangle) up until the part of the image, ...
1 vote
50 views

### KinematicBody2D stutters/moves back and forth

I'm working in Godot 3.5, and trying to set up a navigation polygon for my kinematic body to mode around inside, but when I try to send it to some point, the body 'stutters'/moves back and forth in ...
1 vote
51 views

### Is it a good idea to solve movement of solid bodies with restrictions (e.g. connections) by shifting tangentially and projecting normally in phase sp?

I am trying to code my first 2d game with physics (in python), and so far my physics simulation works with solid bodies. I want to add connections, for example, so the player can rotate an arm and ...
299 views

### How to make enemy turn to face the player while attacking?

I need help making this code work. It is made for the enemy AI to move and patrol, chase the player and attack the player. The problem is when it starts to attack the player, then the player can move ...
2k views

### How to fix diagonal velocity being greater than axis-aligned?

I have a 2D top-down RPG type game, with movement in 8 directions (N/E/S/W/NE/NW/SE/SW) involving both x and y velocity. I'm finding when I'm moving in the diagonal directions, I'm building both x and ...
197 views

### PyGame moves object in one direction but not in the opposite one

I'm having trouble with a PyGame animation I'm writting. I have a Ball class that defines an object that moves on the screen and bounces on the edges. I initialize ...
85 views

### How to use WASD to move camera between a collection of position marker objects?

How can I move one camera between two positions along the cardinal directions? Using W/A/S/D keys, I want to move the camera from one empty object to another on the xy plane. Those empty objects ...
978 views

### Calculating framerate-independent values, for linear, quadratic, and exponential functions

There are a few similar posts, but they only deal with one of the three components I'm looking for, and none seem to handle the case of using a fixed step size (they're all about simulations which use ...
1 vote
70 views

### Move object continuously along y with optional movement along x

I am looking for a sensible way to continuously move an object downwards with constant speed while moving left or right by some amount x when the user presses the left or right arrow keys. Basically, ...
119 views

### How to implement the movement system from SharkBite Bay Adventure?

I'm using Godot Engine 4. The game SharkBite Bay Adventure is a top-down 2D car game, which can be properly played in Bluemaxima's Flashpoint (this app has 2 versions: you can download the lightweight ...
1 vote
371 views

### Animation Dilemma: How to create authentic discontinuous block-like character movement

I am using Unity. I have quite a bit of Unity experience, however I am a novice in animation. In the past I have had someone else do character Animation aside from some Camera animation and simple ...
228 views

### Avoiding nausea when spinning

I'm working on a top down space sim where the ship fills most of the screen and has a fixed heading, i.e. the front of the ship is always at the top. However, there are stars in the background, so ...