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
1
vote
0answers
8 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
23 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
30 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 ...
12
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
49 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
51 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
84 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
42 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
60 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 ...
1
vote
1answer
30 views

Space out units to a grid pattern

So imagine an RTS game, with ~150 units all cramped together, just staying chill. What I would like is to "space them out" so that they d form a grid. This is useful for example when a large ...
0
votes
0answers
18 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
16 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
55 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
16 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
32 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
54 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
76 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
46 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: ...
1
vote
1answer
23 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
191 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
81 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
46 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
96 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
34 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
202 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
31 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
57 views

How to use SmoothDamp with speed?

I have a moving platform which is being moved like this: ...
0
votes
1answer
34 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
75 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
80 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
41 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
71 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
60 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
61 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 ...
0
votes
1answer
31 views

Make movement speed relative to player character rotation in Unity?

I'm doing a strict topdown 2D game where the character looks at wherever the mouse is pointing (same perspective as GTA 2 or Darkwood) . I want to make movement speed for strafing and backing up ...
0
votes
0answers
51 views

OpenGL fixed function - WASD 2D movement

I need to make a simple object (like a turtle) move on a 2D scene. The keys w, s, a and <...
1
vote
3answers
87 views

2d diagonally velocity greater than straight-line velocity. How to fix?

If I have a topdown rpg type game. And movement in 8 directions (N/E/S/W/NE/NW/SE/SW) in a 2d game that involves both x and y velocity. I'm finding when i'm moving in the diagonal directions i'm ...
1
vote
1answer
18 views

Maintaining facing direction at the end of a movement

I want to make my 2D top-down walking animation stop and revert to the idle animation while continuing to face in the same direction as the previous movement. For example, when I go up then stop, my ...
0
votes
2answers
113 views

Moving ship to new destination when already having a velocity?

Feel free to skip to the bottom and see the actual question. NOTE: Question updated below based on comments I am trying to make a space game and implement basic movement, unlike most, this is a ...
0
votes
1answer
19 views

Make transform.up face toward velocity while preventing transform.forward from rolling?

I have been working on a personal project that is suppose to mimic Anthem. I am using a state machine for the character controller that I intend to integrate with the Unity's Animation state machine. ...
3
votes
1answer
73 views

My Earthbound-like Movement Script works in Unity Gameview, but runs differently in Gamebuild

First programming question I've ever made in my short journey. I'm trying to create a script which moves members of your party in a line behind you (think Chronotrigger or Earthbound). Here's a clip ...
0
votes
0answers
69 views

How to have RTS units move along un-even terrain?

My current world is a flat 2D plane. I want to make the terrain 3D, like hills, bumps, etc. If I tell a unit to go to a position (x, y) in 2D, how do I make sure ...
0
votes
0answers
33 views

How can I make player object collide and keep moving until it is as close as possible to click location?

I am making a basic point and click adventure game. I can make the player object move towards the location of a mouse click and collide with walls, but movement stops the instant a collision occurs. I ...
0
votes
0answers
28 views

Steering - Flocking with stopping without jittering

I have a simple steering system that integrates flow-field based path following and separation behavior that I use to control hordes of creatures. These creatures follow the flow-field, but if a ...
0
votes
0answers
35 views

diagonal movement to a enemy in pygame

I spent a long time trying to make the diagonal movement in the form of code but I don't know how to write it. the code I have so far is almost complete but it is missing the pixelart that I will add ...
0
votes
0answers
7 views

Move object along world X/Z axes taking account it's own rotation

I have a camera 9 units up, tilted down at a 60° angle (rotated around it's X-Axis), which means forward for the camera is pointed down at the floor as shown in the picture below Now when I press W, ...

1
2 3 4 5
19