Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
34 views

Why does my character's collider only jumps with the animation while walking?

My character's collider only jumps with the animation while walking. And when he runs he gets stuck in the air and can walk in the air. Here's my script for jumping. At this point I have tried ...
2
votes
2answers
92 views

How to program smooth player 2D movements

I am writing a simple 2D game in Rust, having access to the following dependencies: Piston: for the graphic engine nphysics: for the physics engine The genre is Metroidvania, the game features a ...
0
votes
1answer
18 views

Why is Camera turning with different speed than Player with same code in different scripts? (with unity)

I want to integrate a running character in my game, so I downloaded the animation via Mixamo. The player is running and if I attach the camera directly to the Player it's shaking the camera and the ...
0
votes
0answers
38 views

Simplest way to make a car follow a route

To get the cars to follow the circuit, I mapped the circuits to several points. And using the move_towards_point function I make everything happen correctly. In ...
0
votes
0answers
33 views

How to get one KinematicBody2D to push another?

I am working in Godot 3, where my player is a KinematicBody2D. When I collide with a block which is also a KinematicBody2D I'd ...
2
votes
0answers
37 views

How to properly write “stick to surface” character logic that handles unexpected large time deltas?

I've been trying to wrap my head around this issue: in a 2D platformer game (but this may as well apply to 3D games) I want the character to "stick" to the surface that it's moving along and at the ...
6
votes
1answer
198 views

How do I store destructible terrain that characters can walk on?

I'm trying to make a 2d game like Worms (in JS, if it's important). I found 2 possible ways of implementing destructible terrain: Bitmap. Store every pixel in a huge 2-dimensional array Represent the ...
0
votes
2answers
114 views

2D character movement

My character moves right and left correctly, I want to know if it is possible to move character forward and backward to collect hearts (I know that in 2d no z axis I want to know if it is possible ...
0
votes
1answer
73 views

How do online games deal with lerp overshooting?

From what I understand, when you lerp in an online game, you travel from point a to b based on the elapsed time since the last update. The problem is when you have a higher latency, and you start ...
0
votes
1answer
25 views

Drag object with mouse in diagonal direction

I have a gameobject which i want to move using mouse. Currently i can do that in x-axis and y-axis: ...
2
votes
1answer
87 views

How to implement swooping movement?

I am trying to code some swooping behavior for a flying enemy in my 2D platformer. The ideal behavior has the enemy starting from an arbitrary height above the ground, then accelerating downward and ...
1
vote
0answers
27 views

How to implement back and forth steering behavior?

I am trying to implement some behavior for a flying enemy in my 2D platformer. The desired behavior is for the enemy to fly back and forth across the player, harrowing him. If the player was ...
0
votes
2answers
96 views

How to mitigate speed effects on moving platforms?

I am implementing horizontal moving platforms in my 2D platformer. The way it's implemented currently, when my player lands on a moving platform, he is reparented to it so that his position updates ...
0
votes
1answer
50 views

How to change object curve path in playmode in Unity?

I would like to make some sort of this simulation below, where user can interact with the white rod and drag it into the magnetic fields, which in resulting the blue line that represent the magnetic ...
0
votes
0answers
8 views

Implementing movement patterns using mouse mocap

I am working on a 2D action platformer and want to design some complex movement patterns for a boss that flies around the screen. Rather than describe the movement patterns using parametric curves, ...
2
votes
1answer
77 views

How to constrain a ball and chain like object?

Following up on this question, I have created a snakelike enemy which consists of a head followed by segments. I get the segments to follow the head by constraining each segment's position relative ...
1
vote
1answer
117 views

My Java Game's movement looks awfull. Maybe Problem with Thread.sleep

I have a big problem with my Java games. In every game I make the movement of the player and objects just looks awfull. The framerate is 60 fps without any problems. But the movement looks extremly ...
0
votes
0answers
30 views

Shape-oriented group formation for units

I'm trying to implement a shape oriented group formation, ex: if we have 10 units, the option to form them into a square, a circle, a V formation, etc. I've seen clustering algorithms like k-means, ...
0
votes
0answers
43 views

Character Controller approaches for a fast quadruped

I'm working with Urho3D at the moment, which uses Bullet for physics, and I'm trying to create a character controller / physics system for my quadruped character. I'm aiming to get this character able ...
0
votes
2answers
40 views

Unity3d Move player with UI buttons

I'm trying to move the player based on UI buttons. I found this topic which covers the button listener: https://forum.unity.com/threads/touch-and-hold-a-button-on-new-ui.266065/#post-1944748 Now I ...
1
vote
1answer
64 views

How to synchronize moving hazards?

I am trying to implement a saw blade hazard in my platformer. The saw blade simply moves from point A to point B, and back, at constant velocity. (Let's assume all saw blades move at the same velocity....
0
votes
1answer
34 views

How do I move many “static relative to each other” objects around?

I'm currently building an Elevator Bank simulator in Unity3d and I'm stuck on how to reduce the amount of objects it's going to generate when it's done. The simulator will consist of one player (for ...
1
vote
2answers
63 views

How can I add left and right movement to my sprite without reducing forward movement?

I've made a character sprite that moves left and right when I press A and D, and moves forward automatically. However, whenever the character moves left or right, the forward movement is greatly ...
0
votes
0answers
43 views

Top-down perspective movement/collision

I have been trying to get my top-down collision code/movement system to work the way I want it to: I would like the character to be able to move forward, backwards, left and right, all while being ...
1
vote
1answer
336 views

Unity2D: Vector3.Lerp - smooth movement

I have a script that randomly chooses a position to move a game object every 5 seconds, however instead of moving my object smoothly, my script make my object jumps, which is not desirable! How would ...
2
votes
0answers
53 views

Camera that follows a target with sub-pixel movement

As the title says, I have a character that moves at sub pixel movement (no, I can't change this, because this sub pixel movement happens when I normalize the vector during diagonal movements, ...
1
vote
1answer
105 views

prevent animation from moving the character

As stated in the question I've this problem: I'm using Unity and when playing an animation my character moves from point A to point B without my consent. Here's the code: ...
0
votes
3answers
222 views

How do you program diagonal movement?

I'm wondering how a diagonal element that moves along a diagonal path that hops at each tick of the computer clock is able to travel a greater distance along the screen than an element moving at each ...
0
votes
0answers
58 views

How to sync movement physics over network?

I am having trouble visualizing the best method for syncing the player's movement over my network. My game is pretty much a race of rolling balls down a hill. It relies on the ...
0
votes
0answers
11 views

Construct2-How to set Main character run with circle direction?

I am a beginner in Construct2. So I need your help. When I set key on pressed (ex: right button was press - MC will move to right), but I don't want MC to move with a straight line. How to set the ...
1
vote
0answers
45 views

How to get smooth movement in a low resolution game? [duplicate]

I am using monogame to make a simple platformer with a fairly low resolution. Right now I am struggling to get smooth movement like in the mario games. In those games despite having the low ...
0
votes
2answers
43 views

Bug with OnColliderEnter/Exit when colliding with multiple objects at almost the same time

Unity Version: 2017.4.1f1 I currently have a game with a jumping mechanic. I only want the jump to work where you're on ground, so I have planes on top of everything, which, if you are on a plane, ...
1
vote
1answer
101 views

Game object appears to accelerate too slowly

thank you for checking out my issue! I am trying to develop a game in java, but I have run into a problem. I would like to keep the physics as realistic as possible, so I am using a fixed time-step ...
0
votes
2answers
36 views

Unity: Moving on global X and Z axes with respect to local Y rotation

I'm having a bit of trouble with the math on this. I'm trying to move an object forward based on it's local yaw. Ordinarily, I'd just move it forward on the Z axis locally: ...
1
vote
2answers
69 views

Why does my gameobject fly of into the air when the screen is touched?

I am encountering a peculiar problem when updating a piece of code that translates my gameobject left and right based on mobile touch input. To provide context, the platform upon which the gameobject,...
0
votes
1answer
69 views

FixedUpdate is Being Called Less and Less Over Time…Why?

My game is still in the very early stages, but basically I have an enemy that follows the player if it can see them and will continue to follow the player for a few seconds after the player leaves its ...
0
votes
0answers
84 views

How can I improve my touch slide mechanic to be more smooth and fluid?

I have the following C# code, but it leaves me with two problems: ...
0
votes
1answer
56 views

2D top down 360 degrees rotational movement - stop instant rotation

I currently have a working, decently complicated, way of moving my player around. Using A & D you rotate the player and using W and D you increase forward or backward moving speed. This works ...
0
votes
1answer
121 views

How can you allow a sphere to rotate 360 degrees inside a hollow cylinder in Unity?

I have a hollow cylinder, within which is a sphere. The forward vector is predefined, so the user can not change their forward speed. What they do have control of, however, is the rotation of the ...
1
vote
2answers
123 views

How can I rotate the cube left and right?

I want to rotate a cube left and right with that: ...
0
votes
1answer
75 views

Switching lanes in an endless runner

Some of you probably know the (once) popular mobile games Temple Run, Minion Rush or Subway Surfers. They all have the similarity of a lane system, which allows you to switch your position with a ...
0
votes
1answer
74 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 ...
0
votes
0answers
163 views

Emulating the movement of a differential drive robot

I want to emulate the movements of an Khepera-like roboter (so a differntial drive robot) using Unity. It has two engines, the engine speed is set over the network by RPC magic which ends up calling ...
3
votes
3answers
77 views

TypeScript Space Shooter movement

I'm trying to create a simple space shooter game using typescript and i've got kind of stuck at checking the movement.The thing is that if i only press one key it works fine but if i press 2 keys at ...
0
votes
1answer
226 views

Why does my AI Enemy slide towards its target when it is supposed to be idle?

So using Unity standard assets to get a stage rolling, Ive built a simple terrain and used FPSController as the player and AI ThirdPersonController (Ethan) as the enamy. Ive built the navmesh and ...
0
votes
2answers
60 views

How do I determine the slope of a curve?

I am making a 2D game where the character rides on the curve of a graph. I need to find out whether the player is going uphill or downhill and calculate speed accordingly. The problem is that I am ...
0
votes
0answers
99 views

Tried to make Quake/Half-Life camera act like it does in Mario64/Sonic Adventure but run into a weird bug

So I am trying to implement such a system of controls and camera where moving left would mean moving to the left of the camera's current view direction, etc. I think this is also called movement in ...
0
votes
1answer
58 views

LibGdx Box2D Touch Input Movement

I've created 2 buttons for movement in my game but when those button are being pressed, the character gets basically thrown away and by pressing only once the movement it's continuous and i don't ...
0
votes
0answers
62 views

How to make a train of four following objects in GML

Pretty much what the title says; I'm making a bit of a side-scroller dungeon crawl sort of game in Game Maker Studio 2, with a party of four adventurers running in a line down an endless hallway of ...
-1
votes
1answer
72 views

detecting if a chess move is valid for a given pawn , preferably using Linear algebra

I'm making a chess game, where you simply drag and drop a pawn on the board with respect to each player's turn. when it comes to dropping a pawn we need to validate weather the move is allowed. for ...