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.
1,036
questions
0
votes
0
answers
5
views
Circle to Polygon & Circle to Circle Velocity Resolution
I am working a 2d physics engine.
Polygon to polygon collision and velocity resolution works without issue, but I am struggling to get working circle to circle and circle to polygon velocity working ...
0
votes
0
answers
30
views
How to move a Rigidbody forward using Bullet Physics
I'm currently developing a character controller for my game framework, and I'm utilizing the Bullet Physics engine for the physics simulation. In the process of adjusting the velocity, I aim to enable ...
1
vote
1
answer
665
views
Simulating movement input in server-side, with different tick rates
I'm designing a simple MMO game server with the help of ENet (reliable UDP library) and the Godot engine for client-side. I've read tons of articles, guides, stack exchanges questions regarding ...
11
votes
3
answers
3k
views
How hard to brake to perfectly smoothly reach the destination?
Goal
I want the get the required minimum deceleration to perfectly smoothly reach a target.
(The car's AI should know how hard it has to brake to be the perfect valet.)
Research
"How can I ...
2
votes
2
answers
401
views
Interpolation on Rigidbody2D not working
I'm trying to achieve smooth movement for a ball. I seem to be failing to achieve this and now I've created a sample scene, which shows my setup from the game and the problem exists in that sample ...
2
votes
1
answer
562
views
How to rotate a 3D object based on stick Input and the normal of the ground's surface?
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
vote
1
answer
851
views
How to use SmoothDamp with speed?
I have a moving platform which is being moved like this:
...
0
votes
1
answer
1k
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 ...
0
votes
1
answer
88
views
My CharacterBody3D Is getting blocked by ramps that act as walls
To summarize, my ramp is acting like a wall even if it is created to have a collision and mesh that fits its shape.
I have tried:
Putting the max angle to 90
using different ramps (CSG & mesh)
...
0
votes
2
answers
108
views
Max velocity for smooth deceleration to destination
I am able to update velocity of my agent every 0.5 seconds. My agents max speed is 5f/s and max acceleration/deceleration is 2f/s.
I know how far away I am from the destination. How to determine ...
0
votes
1
answer
57
views
How do i put an entities x,y and z coordinates to a variable(?) in Blitz3D?
I'm making a TEST 3d platformer where the camera follows the player from above. Normally I would make the camera move at the same time when the player moved, for example:
...
0
votes
1
answer
51
views
How to add gameTime to movement with acceleration and diagonal normalization?
I recently started rewriting my engine from scratch, because the old one was my first attempt and the structure was very messy. Everything has been going great, but now I'm being held back by some ...
0
votes
0
answers
19
views
Duplicated the player scene but only the running animation is not playing
First time asking a question here, so hopefully it goes well! So, I had a player scene set up with a custom state machine, for now handling the idle, run and jump stages, currently set up as nodes:
...
0
votes
1
answer
1k
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 ...
1
vote
1
answer
695
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, ...
0
votes
0
answers
75
views
How can I efficiently load and unload regions of a world as the player moves?
I am creating a game with infinite terrain. Sections of the terrain are broken up into regions of fixed size for handling (similar to chunks in Minecraft). I would like to load and unload them as ...
2
votes
1
answer
2k
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 ...
1
vote
1
answer
75
views
Flying AI shakes when chasing and avoiding obstacles simultaneously
I've got a problem with my flying AI in Unity. When it just chases a target it's ok, but my system contains avoiding obstacles so when it starts to do it, it shakes weirdly.
As I understood using <...
0
votes
1
answer
57
views
Sprite chasing a target using move_towards_ip does not move
I'm trying to get a turtle sprite to chase a falling algae sprite utilising Pygame's inbuilt functionality. I have spent many hours reviewing questions and answers and suspect I'm missing some ...
0
votes
3
answers
3k
views
How to move in 3D space in first person mode?
I have a Camera with Vector3 and also the camera has an angle.
If I use this:
hero.position.x += speedX;
hero.position.z += speedZ;
works great but as soon as I ...
0
votes
0
answers
56
views
Determining meters per second in scaled terrain
I have a terrain with a width of 199 and height of 99 and I'm scaling this train by 500. What would be 1 meter in the new terrain, would it be 500? I'm trying to move my character in meters per second ...
2
votes
1
answer
94
views
How to make redirected player movement respond to same key?
I have a 2d game (Godot 4) with different rooms with portals to go between them, and some portals redirect the direction of the player while still holding the same key. I have that working so far, but ...
1
vote
1
answer
2k
views
What is a good approach to dynamically change actor Position?
In my card game there are 2 players with each player having a hand(a ListArray of of Cards.In this case its ...
3
votes
1
answer
2k
views
How can I move a vehicle using speed and steering angle?
I want to drive a vehicle in x and y coordinate area with range from (0,0) to (6000,5000). I am using Visual Components (using Python API).
On input I have speed data and steering angle of wheels ...
0
votes
1
answer
2k
views
How do I prevent camera jitter when rotating the player?
This is a problem that seems to have no reasonable answer anywhere around, yet is a commonly needed aspect of developing game mechanics.
Context
I'm developing a traditional 3rd person character ...
0
votes
1
answer
153
views
How to code glider movement in 2D? (Godot 4)
So in Minecraft, you have the elytra. When you look up, the character moves up. When you look down, the character moves down. The speed you move forward depends on the angle you are moving. I want to ...
0
votes
1
answer
2k
views
How to get the actor to follow the mouse while clicking and holding?
I am trying to do the top down project from scratch.
I can already get the actor to move toward the mouse click:
Only I need to keep clicking several times to change its path and keep walking ...
0
votes
1
answer
52
views
Why are the transform game objects moving away from the snail when they are swapping their direction?
I am making a game in which I created a character (main player) and another character(snail). Now the snail will move on the ground, when there is no ground detected it will change its direction. I ...
1
vote
0
answers
45
views
Move UI element by a specific amount relative to current screen resolution
I want to achieve the following:
At some point in the game, the UI Image (dashed rectangle) should shift towards the right edge of the screen (black outline rectangle) up until the part of the image, ...
1
vote
1
answer
46
views
KinematicBody2D stutters/moves back and forth
I'm working in Godot 3.5, and trying to set up a navigation polygon for my kinematic body to mode around inside, but when I try to send it to some point, the body 'stutters'/moves back and forth in ...
1
vote
1
answer
51
views
Is it a good idea to solve movement of solid bodies with restrictions (e.g. connections) by shifting tangentially and projecting normally in phase sp?
I am trying to code my first 2d game with physics (in python), and so far my physics simulation works with solid bodies. I want to add connections, for example, so the player can rotate an arm and ...
0
votes
1
answer
225
views
How to make enemy turn to face the player while attacking?
I need help making this code work. It is made for the enemy AI to move and patrol, chase the player and attack the player.
The problem is when it starts to attack the player, then the player can move ...
2
votes
3
answers
2k
views
How to fix diagonal velocity being greater than axis-aligned?
I have a 2D top-down RPG type game, with movement in 8 directions (N/E/S/W/NE/NW/SE/SW) involving both x and y velocity.
I'm finding when I'm moving in the diagonal directions, I'm building both x and ...
0
votes
1
answer
143
views
PyGame moves object in one direction but not in the opposite one
I'm having trouble with a PyGame animation I'm writting. I have a Ball class that defines an object that moves on the screen and bounces on the edges. I initialize ...
0
votes
1
answer
82
views
How to use WASD to move camera between a collection of position marker objects?
How can I move one camera between two positions along the cardinal directions?
Using W/A/S/D keys, I want to move the camera from one empty object to another on the xy plane. Those empty objects ...
0
votes
1
answer
917
views
Calculating framerate-independent values, for linear, quadratic, and exponential functions
There are a few similar posts, but they only deal with one of the three components I'm looking for, and none seem to handle the case of using a fixed step size (they're all about simulations which use ...
1
vote
1
answer
66
views
Move object continuously along y with optional movement along x
I am looking for a sensible way to continuously move an object downwards with constant speed while moving left or right by some amount x when the user presses the left or right arrow keys.
Basically, ...
0
votes
0
answers
118
views
How to implement the movement system from SharkBite Bay Adventure?
I'm using Godot Engine 4. The game SharkBite Bay Adventure is a top-down 2D car game, which can be properly played in Bluemaxima's Flashpoint (this app has 2 versions: you can download the lightweight ...
1
vote
1
answer
368
views
Animation Dilemma: How to create authentic discontinuous block-like character movement
I am using Unity. I have quite a bit of Unity experience, however I am a novice in animation. In the past I have had someone else do character Animation aside from some Camera animation and simple ...
4
votes
1
answer
227
views
Avoiding nausea when spinning
I'm working on a top down space sim where the ship fills most of the screen and has a fixed heading, i.e. the front of the ship is always at the top. However, there are stars in the background, so ...
0
votes
0
answers
123
views
Trying to get a Character to face the direction based keys pressed left or right instantly
I finished up my movement script which is finally working fantastically. The only issue I am having is getting the character to face the direction when I press either left or right on the keyboard. ...
0
votes
0
answers
76
views
applying gravity breaks entirely this AI movement code
I'm calling this function every 0.078 seconds so about at 13 fps using a timer connected to _ready()
this way my game can easily run over 400 enemy units with ...
0
votes
1
answer
109
views
0
votes
1
answer
112
views
When to use InverseTransformDirection in Unity
I want to know when to use InverseTransformDirection.
Unity documentation says : "Transforms a direction from world space to local space". Honestly, it is not clear for me.
I came across ...
0
votes
1
answer
54
views
How to carry other players and NPCs and Objects?
In my game you don't have inventory slots, you can hold two things if your player has 2 arms and so on, you can hold more things if you equip a bags on your belt or backpacks... and you can carry even ...
1
vote
1
answer
217
views
Rigid bodies sliding off slopes
Kinematic bodies have a simple class that makes the player not slide on slopes, but for rigid bodies? I tried using rays and areas, either to lock the player on an axis or to just straight up disable ...
0
votes
1
answer
147
views
How to adjust parabolic trajectory to hit the same point with the same launch angle, but faster speed?
I'm launching a ballistic projectile similar to this sample.
The projectile moves from the launch point to the target point, but it's too slow. When I try to increase the speed without changing the ...
0
votes
0
answers
27
views
How to make Cardial Directions relative to the camera
Lets suppose tha my movement method my W goes towards north(just figuretvly) and my E goes towards east, If I rotate my camera to east I want my W to insted goes to north, goes towards east and my E ...
0
votes
1
answer
121
views
How do I make my player rotate in the current direction of my camera in Unity using C#?
I have a player with third and first person camera, I want to make my player move in the direction that my camera is looking at when I hold the right mouse in third person and move(Like my player is ...
0
votes
1
answer
42
views
Orient a player mid-air to their predicted landing orientation in Unity?
Ever played Skate 3? When dropping into a ramp, or if you're midair, your player's up direction aligns to the normal of the surface you're about to land on, while respecting the player's forward ...