2022 Developer Survey is open! Take survey.

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Help with making a sidescroller enemy turn in the opposite direction

recently I’ve been working on a way to make a sidescrolling enemy turnaround & go back in the opposite direction when they collide with a non-player object, with my setup being based on the one ...
user avatar
0 votes
1 answer
35 views

Pixel Perfect Movement

Could someone explain or send me a pixel perfect movement script? I don't find anything good explained. My idea was to set the position to int but that doesn't work.
user avatar
0 votes
1 answer
23 views

JS 2D top down movement doesn't act as expected

I realise this is very similar to other 2D movement questions already posted but cant find a solution that fits the behaviour I'm looking for, so I'm posting in the hope that someone more ...
user avatar
0 votes
0 answers
18 views

Problems with creating Linear Guide using Configurable joint

I'm trying to create an Linear Guide mechanism using Configurable Joint (I think this joint is better than other for this situation). I connected an orange cube to another object (let's call it frame) ...
user avatar
0 votes
0 answers
44 views

Latency handling methods in a fast-paced multiplayer game with moving objects

I am working on a real-time multiplayer soccer game. Currently, on my game, I created an architecture like that: Every client has a copy of the game state, also the server has it too. Clients send ...
user avatar
0 votes
0 answers
12 views

How to rotate a players movement axis as camera switches? (Not used to coding)

I am using unity and I have two cinemachine cameras with two seperate camera angles. For one camera angle I want the players W key to move at a 45* slant while at the other I just want it to be ...
user avatar
1 vote
1 answer
53 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, ...
user avatar
2 votes
0 answers
94 views

Fix slow and weird diagonal movement on slopes in Godot 3D?

I am creating a 3rd-person player controller using move_and_slide_with_snap in the style of WoW, so the player's speed should be the same horizontally no matter what the slope of the terrain they're ...
user avatar
0 votes
2 answers
35 views

Unity Follow Object Movement in Local Space?

I have two objects in my scene each at different positions and rotations in the scene. In this example, object A (the leader) moves according to controls. I need object B (follower) to follow the ...
user avatar
0 votes
1 answer
29 views

Control different speeds for moving left/right, and facing that direction

I have a game idea... and I need a script where I can control the speed for moving left, and control another speed for moving right. But, I also need to let my player face that direction. ...
user avatar
5 votes
1 answer
218 views

Why would a bigger game move the gameworld around the Player instead of just moving a player within a gameworld?

So, this might be a little random since I can't remember any specific examples but this question just popped into my head 30mins ago and wont leave me alone. I remember hearing about some big game ...
user avatar
  • 51
0 votes
1 answer
50 views

Sliding character inside the circle

When it comes to rect against rect smooth sliding movement, that is easy. Something like this will work ...
user avatar
0 votes
0 answers
22 views

Javascript Game Collision Shaking

I have a problem with collision shaking. The problem doesn't come from the collision, but from client side (sometime the it's smooth and sometimes not). Here is a video to show it : https://www....
user avatar
0 votes
0 answers
48 views

LibGDX sprite not moving with rotation

I have a player class and I'm trying to rotate the player and move it in the direction it's facing. The rotation works but I can't get the sprite to move. ...
user avatar
0 votes
2 answers
42 views

How to restrict player movement without jitters

I am currently making top-down space shooter and would like to hear some suggestions on how to restrict player movement without causing jitters. Everything works fine except one thing: the player (...
user avatar
0 votes
0 answers
20 views

Applying quadratics to velocity based player movement

In a speed based system where player.x and player.y +=1 when a button is pressed, a 3pt quadratic can be calculated via ...
user avatar
  • 197
1 vote
0 answers
200 views

Pixel-perfect jitter-free motion

Here's a thing I cannot wrap my head around: When we are talking about low-resolution pixel art, there is a subcategory that deals with pixel perfection: Like in the olden days you are restricted to a ...
user avatar
  • 111
0 votes
1 answer
83 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 ...
user avatar
  • 1
0 votes
1 answer
29 views

Implementing Linear Diagonal Movement Relative to Camera Rotation

So far I've implemented horizontal (X-axis) and vertical (Z-axis) linear movement for the player in a 3D game. Using the code shown below, the player is able to move relative to the camera's Y-axis ...
user avatar
  • 101
0 votes
0 answers
162 views

How can I force my Navmesh agent to only move four directions? (for 2D)

I'm making a 2D game in Unity. For 2D I am using the NavmeshSurface2D-plus master package available on github. My enemy object is chasing my main character nicely, it's ok. I set my main character to ...
user avatar
  • 13
1 vote
0 answers
27 views

Calculate 2d rotation to target (uniformly accelerated rotation, constant speed)

I'm trying to calculate an uniformly accelerated rotation for the autopilot module in my 3d space game shooter. The autopilot should fly the spaceship to any given point in the 3d space on the ...
user avatar
0 votes
0 answers
32 views

High rigidbody drag value gives weird speed readings

when calculating speed in unity ...
user avatar
  • 145
0 votes
1 answer
39 views

Animation and Movement -- Prototyping Efficiently

I'm a solo dev working on prototyping my game's movement system. My character is intended to be agile and lightweight, with quick movement options and a knack for climbing. As we know, the key to ...
user avatar
0 votes
1 answer
75 views

Pygame : having trouble with implementing movement with vectors

I've been struggling a lot to learn how to use vectors in programming. Now I've successfully made my own vector class but I still can't use vectors for movement. This is my class : ...
user avatar
  • 216
0 votes
1 answer
174 views

Make object follow another object like a dog sled

I'm trying to achieve the effect of a dog sled for a small prototype. All my attempts failed until now. I have the following code (inspired from this) ...
user avatar
0 votes
0 answers
21 views

How to select one game object and move it?

For example, I have two game objects, cube1 and cube2, in a scene. I want to be able to click on one and move it. I know how to use ray to highlight it, like below: ...
user avatar
11 votes
1 answer
3k views

How can I "zero out" velocity in an arbitrary direction?

I'm currently running into an issue with my character controller using physics-based movement of rigidbodies in Unity. Here's an illustration of the issue I'm facing: Basically, after a jump, my ...
user avatar
  • 530
0 votes
1 answer
40 views

Callback to a dynamic value in GameObject.transform

I'm currently writing an InputManager using Unity's "new" input system. The InputManager receives all player input ...
user avatar
1 vote
1 answer
26 views

Can't get ThirdPersonController player to stick to a moving platform

I've followed 10+ tutorials on setting up basic C# code to allow a player gameObject to stick to a moving platform (even followed the code verbatim) and nothing works. I added some debug print ...
user avatar
  • 21
0 votes
0 answers
9 views

In Unity how do I translate a game object's position relative to the axes of its parent object? [duplicate]

Basically, I have the following issue in my game scenario. I have a player game object whose parent object is a player rig (the parent also contains a camera following the player). I want to be able ...
user avatar
0 votes
2 answers
78 views

Why do objects spin in circles instead of stopping when reaching their target?

This script is attached to each drone. ...
user avatar
1 vote
1 answer
64 views

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

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 ...
user avatar
0 votes
1 answer
38 views

Overshooting when traversing between two points with a set velocity

I'm creating a prototype for something I may make into a game and I've run into difficulty in creating a method to move a ship along a line between two points. While it reaches the end point, it ...
user avatar
0 votes
0 answers
46 views

TRPG data structure

I have this question since a while now. In a TRPG game like Fire Emblem or Advanced Wars (or even in something simpler like a chess game) with tiles and units, you need to store where each unit is in ...
user avatar
  • 105
0 votes
1 answer
53 views

Move between two points at a constant speed in LWJGL

I've been making a game engine in lwjgl and I have been trying to get an ai to move from one point to another. I used a lerp method but the speed is dependent on the distance between the two points, ...
user avatar
0 votes
0 answers
30 views

Unity 2d - Enemy continuous curved movement

I'm trying to implement random enemy movement in a top down shooter game. Currently the enemy moves in a straight line from his current position to a randomly generated target position. Is there any ...
user avatar
1 vote
0 answers
61 views

How to move game pieces in checkers?

I have been creating a 3D Checkers board game via Unity. So far, I have managed to create the board game, with its game pieces well positioned into their designated rows and tiles upon starting to ...
user avatar
0 votes
0 answers
22 views

How to smoothly move in FixedUpdate using touches on mobile?

I have a serious issue for over a week now and no matter how - I can't make it work. I have a simple movement system, where I move the player on the X position: ...
user avatar
  • 2,502
1 vote
1 answer
44 views

How to prevent GameObject from moving?

I am making a pong game and here's the problem. The ball hits the enemy paddle and instead of reflecting the ball just takes the paddle with it. Ball Brains - ...
user avatar
0 votes
0 answers
21 views

Add some randomness to the velocity when a ball bounces using UProjectiile Movement Component

I've just started to learn Unreal Engine 4.26.2 with C++. I’m developing a clone of Arkanoid and I’m using UProjectile Movement Component to move the ball. When the ball hit something it always ...
user avatar
0 votes
0 answers
57 views

Using UI buttons for Input Manager

My character is supposed to be moved by 4-directional joystick. Until today I was using basic Input Manager for handling this from keyboard. I mean Horizontal and Vertical Axis. How can I make it so ...
user avatar
  • 1
0 votes
1 answer
74 views

Teleport character a fixed distance in the direction it is looking

Game : bird's eye view (2D) When I touch the button, my character will teleport a fixed distance in the direction it is facing. If there is an object at that distance (like a wall) it will not ...
user avatar
  • 13
0 votes
1 answer
112 views

Collision Resolution for Height Maps

GameDev StackExchange! I've written height map collision detection into my game, but I've been struggling on how to get the resolution step to work well with player movement. (This is in 3D, by the ...
user avatar
0 votes
0 answers
54 views

Is there a Godot equivalent of VelocityChange (like in Unity3D)?

In my Pong game the pressing of the required key and the actual movement has a delay in b/w. I believe this is because the force is building momentum and then moving, a problem I solve in Unity by ...
user avatar
0 votes
0 answers
55 views

Allow Player controlled by NavMeshAgent to walk

I have a Player that I control using the thumbstick (or z/w/s/d), and I would allow this player to have walk and run. Now, My current code is the following for the movement : ...
user avatar
  • 105
0 votes
0 answers
14 views

how to make an axis from one gameobject the same as the axis from another gameobject

I am making a third person script in unity and I want it so that when you aren't moving you can pan around the player and when you are moving the player faces in the opposite direction to the camera ...
user avatar
  • 145
1 vote
0 answers
45 views

how can I normalize the speed of a polygon moving over a series of connected quadratic bezier curves with varying lengths?

I am generating a bunch of quadratic curves that are connected together, creating an array of curves, and a function which returns the position on the curve for a given time. ...
user avatar
  • 209
0 votes
1 answer
111 views

Pygame logic to make a player stop at obstacles without overlapping them

what's the best logic to force the player to change its direction when he's just next to an obstacle (building, rock, tree..) ? I know this is related to collision detection but maybe my logic isn't ...
user avatar
  • 216
14 votes
2 answers
3k views

What are some good examples of the practical usages of cross product in game development?

I know how to calculate cross product, and know that the cross product of 2 vectors is a third vector that is perpendicular to a plane created by the first 2 vectors. However, I have not seen any good ...
user avatar
0 votes
1 answer
109 views

All kinds of 2key controls

I want to find all possible ways to control a game using 2 keys on input. 1. Summarize the problem I find a brand new game engine that has only two inputs but great potential! And the community of ...
user avatar
  • 3

1
2 3 4 5
20