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
0answers
37 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
16 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
17 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 ...
2
votes
0answers
42 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
10 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
37 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
12 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
24 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
46 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
85 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
46 views

How do I code double jumps to character controller in Unity?

Here is my script. I just started coding like 3 days ago so I don't know much. ...
0
votes
0answers
33 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
14 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 : ...
1
vote
0answers
12 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. ...
1
vote
1answer
36 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 ...
1
vote
1answer
83 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
0answers
58 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
88 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: ...
2
votes
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 ...
1
vote
1answer
74 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
45 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
16 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
19 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
58 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 ...
1
vote
0answers
17 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 ...
1
vote
0answers
37 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 ...
2
votes
1answer
65 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
22 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
76 views

How to use Left Shift to run Unity?

So, I need to use LShift to run, but I can't exactly figure out how to do so.... I don't know what to use.... Here my code: ...
2
votes
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
213 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
110 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
63 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
105 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
54 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
259 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
36 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
83 views

How to use SmoothDamp with speed?

I have a moving platform which is being moved like this: ...
0
votes
1answer
53 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
78 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 ...
0
votes
1answer
43 views

How to handle movements of objects in a platformer with a cylindrical map?

I was wondering what would be the best approach for a game with a perspective like Resogun, where the world wraps around in a cylinder: In my opinion, the easiest approach is to: have a "...
1
vote
2answers
106 views

Free movement in a 3D isometric world

I'm currently experimenting with movement in a isometric perspective world and i'm thinking about how the movement should work. The movement can be either by WASD or gamepad. Since the player can ...
0
votes
1answer
61 views

How to implement Vector3.MoveTowards follow with random movement

I want to implement an AI behavior where an enemy runs towards the player while sidestepping randomly and aggressively (like in this video: https://www.youtube.com/watch?v=35Ut_C4eL40) Currently I am ...
0
votes
1answer
86 views

Make enemy move diagonally in 2D

I'm making the enemy follow the player only straight or diagonally e.g.(1,1)(1,0)(0,1)(-1,1). I expected the problem that I have, but I don't really know how to fix it. When my enemy is placed ...
0
votes
1answer
62 views

Is speed and direction generally combined into one vector, or separated into two?

Couldn't find this answered already, surprisingly. For example, for a game (in my case a 2D top-down one), there could be advantages to doing so. For example, whenever you want to change an entity's ...
0
votes
3answers
81 views

How to make UI image bounce back and forth inside another UI image?

I've been trying to create a battle system for my game, and I've been trying to get a UI image to bounce back and forth inside another image, but for some reason, the UI image goes out of the other UI ...

1
2 3 4 5
20