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
9
votes
1answer
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 ...
1
vote
1answer
25 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 ...
0
votes
1answer
15 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 ...
0
votes
0answers
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 ...
0
votes
2answers
71 views

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

This script is attached to each drone. ...
1
vote
1answer
26 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 ...
-1
votes
1answer
33 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 ...
0
votes
0answers
38 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 ...
0
votes
1answer
23 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, ...
0
votes
0answers
18 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 ...
1
vote
0answers
46 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 ...
0
votes
0answers
11 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: ...
1
vote
1answer
39 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 - ...
0
votes
0answers
14 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 ...
0
votes
0answers
26 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 ...
0
votes
1answer
50 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 ...
0
votes
1answer
91 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 ...
0
votes
0answers
41 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 ...
0
votes
0answers
28 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 : ...
0
votes
0answers
13 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 ...
1
vote
0answers
32 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. ...
0
votes
1answer
47 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 ...
14
votes
2answers
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 ...
0
votes
1answer
89 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 ...
0
votes
1answer
77 views

How to design a system that allows for custom equations of movement?

I'm developing a top-down shooter and I currently have a PhysicsSystem which operates on TransformComponents. Basically, it ...
0
votes
1answer
90 views

How could I move an object, while respecting the gravity and other related physics in Unity?

How could I move an object, while respecting the gravity and other related physics in Unity? I tried using the following approach: ...
1
vote
1answer
46 views

Making Sprite Movement Appear More Natural

Currently I have a 2D game in which the player and a computer controlled (non-player) sprite move from point to point collecting tokens in a continuous environment. The player and the non-player ...
0
votes
1answer
84 views

Turn-based grid movement - each click of the clock you want to move the player

I am working one the movement for a tactical turn-based pygame. I'm stumped as to how to get a selected object to move one tile at a time up to it's max movement to the mouse's pos. Right now this is ...
0
votes
0answers
57 views

UE4 Blueprints - AI movement on moving platform/object (like a ship deck)

I want to have AI (enemies) on a boat that moves on a path around the level (an island). But the AI seems to have a problem navigating on the deck of the ship. They always end up on the far back of ...
0
votes
0answers
17 views

How to ensure that a randomly-generated velocity vector moves the camera forward within a valid arc?

I spawn a camera in a scene using random coordinates for x and y and setting z=0 and orient ...
0
votes
0answers
20 views

Platformer movement disabled after crouching

So, the problem is the movement to left and right is disabled after crouching and releasing ...
2
votes
0answers
37 views

Finding a path to a circular zone in continuous space [duplicate]

I need to find the shortest path for an agent that wants to use a ranged attack against the specified target. This means that the path's ending point should be inside the range of the attack and have ...
0
votes
0answers
65 views

How to decay sine or cosine wave so it takes one additional period to reach equilibrium

In many shmups, when enemies arrive, they accelerate onto screen, decelerate, and overshoot their static arrival position slightly, before backing up slowly to the position. This can be seen in many ...
0
votes
0answers
18 views

Sync issues with replaying movement

I am creating a networked game and having issues with keeping positions synced between multiple clients. Essentially what I have happening is one client's movement to replaying on another routed ...
0
votes
0answers
45 views

Unity Job System - Transform movement but checking collision with wall

I am trying to get this Unity Job System to work on my top-down shooter 2D game I am currently using transform.position to move player around. I can do it in the ...
1
vote
1answer
70 views

How to create the slow random movement effect you see in shmup enemy idles?

I’ve noticed in a lot 2D shmups, after enemies accelerate onto screen and arrive at their arrival point, they don’t simply sit static at their arrival position, but rather begin to gently move in ...
1
vote
1answer
78 views

how to center 3d camera vertically and horizontally

How to center the player/camera in the middle of the window/screen , to mimic a 2.5d camera, ...
0
votes
1answer
34 views

How to I make MOUSEY look up

I have MOUSEX worked out perfectly, it moves on the X axis, but when I add the Y axis, I can't use the MOUSEX axis. ...
0
votes
2answers
133 views

How to use Left-Shift to run?

I need to use Left-Shift to run, but I can't figure out how to do so. Here my code: ...
1
vote
1answer
25 views

Playerbody is turning, but not moving in direction turned

So, I have a simple WASD script, and I've added a part so when Mouse X is moved, the playerBody (character) rotates in that direction, so, when W is pressed (to go forward) the player does not move in ...
6
votes
2answers
219 views

Networking a fast-paced game (2D) - Forced Movement - Server / Client

I started a new project, a fast-paced online game (some sort of 2D MOBA). I encountered a problem with the part of netcode about client prediction & server reconciliation. Game Mechanics: 2D - ...
1
vote
1answer
135 views

Move 2D Rotating object in its facing direction

I have a 2D object that constantly moving forward (in the direction its facing). So initially its facing right, and moving right, but as the rotation z-axis changes, so should its direction. Most of ...
0
votes
0answers
91 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 ...
2
votes
1answer
108 views

What would be the best way to implement a multi-directional "board game" movement system?

I'm pretty new to game dev, and can't figure out how to do this, even though it is probably really easy. If you need more reference, look up some gameplay of the Wii game Dokapon Kingdom, that's the ...
1
vote
1answer
104 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 ...
4
votes
2answers
283 views

How can I create the arriving/ engaging in combat movement like in StarCraft 2?

I currently have two armies (smaller scale) crashing into each other. They will usually form a line of units fighting. I have no idea how to handle a unit coming from behind the line to properly go ...
0
votes
0answers
44 views

2D Isometric Movement - Move to Mouse Position

I'm developing a 2d isometric game on a engine made by myself (as a way to practice Java), however i'm stuck on what it seems to be a math problem. I wish I could have some help on how to implement a ...
1
vote
0answers
95 views

How to use SmoothDamp with speed?

I have a moving platform which is being moved like this: ...
0
votes
1answer
73 views

Character controller falling with positive speed

I'm having very weird problems with my player's vertical movement. I'm using a Character Controller component with a capsule collider and no rigidbody. For testing purposes, I've ended reducing my ...
0
votes
2answers
83 views

How do I set the size of a single 'unit' in my game?

I'm currently trying to remake/port an old game created on Unreal Engine 2.5 to my own engine, and I have access to its physics data. It's using a scale of 80 units per meter, or 1 unit = 1.25cm. The ...

1
2 3 4 5
20