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
22 views

How to launch a 2D character toward the mouse position?

I want to launch a 2D character using the mouse, but for the life of me I can't figure out how to get the character to move left or right during the launch. Its as if the code is ignoring the X axis ...
0 votes
1 answer
38 views

How to implement movement with move speed in a multiplayer game?

I'm developing a MMO RPG using Rust and bevy both in the client and the server, which means that I'm using ECS on both sides. My game is tile based, so each tile is a point in my map in the server, ...
0 votes
1 answer
57 views

It's hard to move characters properly in Unity

I want to replicate the movement of a Team Fortress Scout in Unity, so the movement of the player must fall naturally, not slide, and not pass through objects. It must also be affected by ...
0 votes
1 answer
50 views

How to change GameObject position using new Input System?

I was asking myself if you could change the position of a game object with the input of the player, with the new input system. That is, with something like this: ...
0 votes
1 answer
47 views

Walk on any surface, how to make a defined space around character not pass through any collider

I'm working on an 3D insect/spider controller that will walk on any time of surface. Currently my character scan the environment around him by shooting a very big number of spherecasts and based on ...
  • 1
-1 votes
1 answer
22 views

Cube moving in a laggy way

The movement on its own works perfectly fine, the problem is just that when I move diagonal, then the cube (the Player) is kinda lagging around and you can see its pixels moving to the edges of it. ...
0 votes
0 answers
38 views

Kinematic Rigidbody parented to a moving Rigidbody gets displaced

I have a kinematic Rigidbody parented to another non-kinematic moving Rigidbody. Render-wise, the child Rigidbody does not jitter, nor does it inherit any displacement changes from the parent ...
0 votes
0 answers
36 views

Switching to idle set of animations smoothly from walking animations in 2D tile-based RPG

Currently developing a 2D RPG that has Pokemon/early Final Fantasy-like movement mechanics, where the player/NPCs move in units of tiles. My game logic for handling keypresses is as follows: ...
15 votes
4 answers
3k views

Solving obtuse interior corner collisions

I'm having some trouble solving collisions in obtuse interior corners. In the above image, the black circle is the initial position, the red is the projected movement (straight into the corner), the ...
  • 751
0 votes
0 answers
45 views

Arrive Steering Behaviour velocity not decreasing properly

I'm trying to implement the Arrive Steering Behaviour with acceleration from AI For Games 3rd edition by Ian Millington (Algorithm on Page 63) ...
  • 1
0 votes
0 answers
37 views

6DoF camera control with a toggleable gimbal/horizon line lock and auto-upright button

I have a smooth 6DoF controller from following a tutorial (this is the tutorial) and tweaked it to be exactly what I want with a few exceptions. I found myself wanting the ability to lock the horizon ...
0 votes
0 answers
54 views

Different approaches to rigid-body movement

I'm a beginner at game development and I'm building my own physics game engine to grasp the concepts. I wonder if there are different approaches to moving and rotating a rigid body. For example, ...
  • 1
0 votes
0 answers
70 views

Solution for back-and-forth jitter when sliding down terrain slopes?

I've got a C++ app where the player is represented by a vertical line segment, walking on triangulated terrain. There's some terrain sliding that allows you to walk on the terrain as long as the ...
  • 69
0 votes
1 answer
45 views

How to allow a CharacterController to pass through walls?

I'm developing a game in which bot-controlled billboards pursue you. If the bot gets stuck behind a wall for a while, not able to catch the player, I want the bot to pass through the wall. I'm using a ...
0 votes
2 answers
60 views

Changing falling behavior of my object after collision to go gradually down and not instantly

Context I'm here today to figure out how can I have an object to fall down after colliding to another object. In my case, I'm remaking Flappy Bird and trying to reapply some of the physics in place ...
0 votes
1 answer
31 views

How to have point of view independent Screen Space Reflection deepness

With regular raymarching algorithm we can fade the reflected pixel based on the number of iterations used when looping. I can’t use an iteration number when doing both hierarchical z (HiZ) and ...
  • 89
0 votes
0 answers
20 views

How to determine whether an image in 2D is moving in clockwise direction or anticlockwise direction with cursor movement by dragging the mouse? [duplicate]

I am able to rotate a medical image individually one by one i.e by commenting the clockwise rotation code it is getting rotated in anticlockwise direction and by commenting the anticlockwise code it ...
0 votes
0 answers
61 views

Real-life "fighter jet" like movement behavior in a 2D side-view game

I'm looking for a way to implement a fighter-jet like movement behavior for my non-player entities in my 2D side-view shoot-em-up. I.e. enemy entities (say jets or planes) can't suddenly change their ...
0 votes
0 answers
24 views

What are some steps I can take to improve the feel of my dash?

I'm trying to implement a dash ability for my player that feels good, but what I have right now sort of feels "flat." What I have is pretty simple, like this: ...
-1 votes
1 answer
52 views

Move object on World's XYZ axes

I'm trying to move my Character on the world's XYZ Axes, but how do I get them? I'm trying to do this because my Player is sort of a Sphere and is rolling around, so its xyz directions are rotating. I ...
  • 3
0 votes
0 answers
70 views

Rigidbody movement direction on slope not matching with player orientation

I've encountered an issue with my Rigidbody movement script on sloped surfaces. When moving up and down small slopes, the movement works as expected, but when moving up and down steep slopes I notice ...
2 votes
1 answer
148 views

Movement system for thousands of entities

I want to implement a movement system for armies of multiple thousand units. However, I struggle to get the movement "stable" when there are more than a few hundred units. The problem: When ...
  • 23
1 vote
1 answer
43 views

Rotating a command relative to the body of a drone

Suppose you have a drone the shape of a cube with rotors on each face, it's completely unable to control its roll-pitch-yaw, but it can accelerate along any of its 3D orthogonal vectors (see image ...
  • 11
1 vote
1 answer
57 views

Rectangular Collision Resolution behaving incorrectly on corners

I'm currently writing a simple game engine and encountered an error while trying to resolve rectangular collisions. When an object moves diagonally and collides with a solid object I only correct it ...
0 votes
0 answers
79 views

Unity 2D Parabolic character movement between platforms displays unexpected behaviour

I am trying to write an enemy AI that jumps between available platforms when it doesn't have ground below its feet. I want the character to do the jumps in a parabolic fashion rather than doing a ...
2 votes
1 answer
226 views

Pygame moving only once when key pressed integrated into player class

I'm having an issue when I have created a player class and want to move my sprite in between three lanes. I was able to get the sprite to move when I used ...
1 vote
3 answers
62 views

How to calculate coefficient for how much a object with velocity x is moving towards point a?

I have a object in 3d space that has certain position and velocity. If that object moves perfectly towards point A, the coefficient should be 1. If it moves perfectly away from A it should be -1 or 0. ...
0 votes
0 answers
77 views

How do buildings in (Tile based) city builders/colony sims keep track of each other? [duplicate]

Like, how does a building in these games know if they're being powered? Or if they're within range of influence of a hospital or fire station, etc. How would they know where to send an NPC or ...
0 votes
2 answers
184 views

Why is Vector3.ProjectOnPlane() "drifting" further from desired rotation on steep slopes

I'm writing a simple player movement script in Unity 3D, and I've been using Vector3.ProjectOnPlane() to accomplish slope/ramp movement. For the most part, this ...
0 votes
0 answers
128 views

Movement diagonally is not consistent

I am making my own game and this is the first time i'm doing so. so I hope you can forgive stupid mistakes. Im making this in C++ and using the SDL2 framework. Currently, I have a character on my ...
0 votes
1 answer
26 views

Anchored Pull Function Breaks at Low Framerate

To start, I'm not working with an engine and am looking for some help fixing the math behind the function I created. Say we have anchor, ...
0 votes
1 answer
47 views

Why is my character controller deacceleration not working?

I want my player to deaccelerate when he stop not just stop in place. Here is my code: ...
  • 183
0 votes
0 answers
57 views

Quaternions around a moving Sphere

I'm using quaternions in my code to move my game camera around an object in 3D space. When stationary it works great and really simplifies the code. Unfortunately when the object starts moving I can't ...
0 votes
1 answer
59 views

Sometimes player moves too much

I'm working on a simple platform game. I have the player - a dynamic body, which moves by ApplyLinearImpulse. Generally it works very well, but sometimes the player ...
1 vote
1 answer
73 views

How to make an object move and rotate the same amount as another obejct

INTRO: I am trying to make a camera move around in a fast moving, rotating in all axis, spaceship.... This person has achieved exactly what I need to achieve if that is a good reference for you (go to ...
  • 269
2 votes
0 answers
157 views

What's the best strategy for incorporating jumps into a 3D AI navigation algorithm?

I'm trying to make a game centered around chase sequences in a 3D level with a high degree of verticality and movement options for the player. Basically think Breath of the Wild in an urban landscape ...
0 votes
1 answer
35 views

Player movement script based on a given symmetry

I'm trying to make a game where the movement of the second player is based on the first player's movement but with a given line of symmetry. For example, if the inputted symmetry was y=x, then when ...
  • 1
0 votes
0 answers
18 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 ...
0 votes
1 answer
57 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 ...
0 votes
0 answers
92 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) ...
0 votes
0 answers
98 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 ...
1 vote
1 answer
394 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, ...
2 votes
0 answers
344 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 ...
0 votes
2 answers
83 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 ...
0 votes
1 answer
73 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. ...
5 votes
1 answer
282 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 ...
  • 51
0 votes
1 answer
73 views

Sliding character inside the circle

When it comes to rect against rect smooth sliding movement, that is easy. Something like this will work ...
  • 123
0 votes
0 answers
41 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....
0 votes
0 answers
132 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. ...
0 votes
2 answers
167 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 (...

1
2 3 4 5
21