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

PYGAME - Sprite movement seize to function when entire X and Y span is reviewed

I've created an sprite class that has a detection radius checking if the player enters the zone. If yes, the sprite moves towards the player. It works perfectly fine when the sprite checks for three ...
0
votes
1answer
34 views

Control how quickly 2D vehicle straightens out

I'm implementing vehicle movement in a 2D environment, where a vehicle consists of a front and a back "axle", both represented as 2D points. When the front axle moves, the back axle should ...
1
vote
0answers
17 views

User input scheme of 2d vector field on a 2d plane for navigation

I want to create a strategy game based on distributions of "units" which can be moved around and attack each other. By distribution of units i mean that i don't have any discrete units ...
0
votes
0answers
11 views

Cinemachine third person camera movement causes misalignment

I'm working on third person movement using CinemachineFreeLook as the player camera. At first I thought it was working fine but I've noticed that moving left/right actually moves the character with a ...
0
votes
1answer
26 views

Buttons only trigger right/left movement once, not continually

I have a Unity mobile project where I am trying to use right/left movement using two UI buttons situated accordingly. The issue is that it only moves the player to the right/to the left one time, not ...
1
vote
0answers
26 views

Path following with turning radius and obstacle avoidance

I would like to move an object through a path found by A* star but taking into account the object's turn radius and movement speed, while also avoiding possible obstacles during a curve. After some ...
1
vote
1answer
28 views

How to stop sliding properly

I wanna stop immediately (not instantly) when I release a key so it would not slide. I don't wanna use rb.isKinematic = false; because it's just stopping so instant....
0
votes
1answer
10 views

Having trouble combining clampMagnitude and some explosion force

I have a character that uses rigidbody, and I am using AddForce() to make it move. And so I do ...
0
votes
0answers
20 views

When I use rigidbody.move rotation, my player sinks

I am trying to implement a simple movement on an object and when I use movePosition from rigid body, the player starts to sink: How can I resolve this issue? Below ...
0
votes
1answer
36 views

Why do I get a jitter/stutter when moving and following a target?

I am using the script below to move a transform to quickly follow a target (the player), and come to a stop close to the player. When I move the player around, the transform is following the player, ...
3
votes
2answers
58 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 ...
0
votes
1answer
18 views

Clipping speed when turning without using aggressive drag

I have a Unity project in which I want to control a player in a similar way to Source games, and so far I am clipping each input to the speed in the player's coordinates, by using ...
0
votes
0answers
29 views

How to implement framerate-independent acceleration depending on current velocity

For my client/server application, I've implemented framerate-independent acceleration like this. Now I've advanced my formula to be using the current velocity of the moving object to calculate the ...
0
votes
0answers
47 views

Move enemies over the network without sending their positions

I am trying to move enemies on two clients without sharing their positions. I use this: startingPosition + GetRandomDir() * Random.Range(1f, 10f) To have the same ...
2
votes
2answers
153 views

Should the entity handle his own movement?

I am currently building a simple turn based game with a Room consisting of a 2D array of Tile objects. Those can be WallTile or FloorTile. Tile objects have a north, east, south and west Neighbour. ...
0
votes
2answers
77 views

How can I fix “Cannot read value of type Vector2 from composite” error in Unity?

I'm making a 2D game with Unity using the new Input System. I used spriteRenderer.flipX to flip the player but since it is made of three parts (body and two eyes), ...
2
votes
1answer
78 views

What's causing this stutter when framerate fluctuates?

I'm working on a class responsible for arm sway in an fps engine, and am having an issue with a stutter that appears to be related to fluctuating framerate. However I have also noticed it when locking ...
0
votes
1answer
46 views

Why does ForceMode.VelocityChange work but not Rigidbody.velocity = … in script?

I have a FPS movement script that I created that has a jump function that looks like this ...
1
vote
1answer
52 views

How can I implement a Varying Jump Height Mechanic for my character?

First of all I want to mention that English is NOT my mother tongue, I am using GODOT to make my game and that I am only 16, so I don't have any prior programming experience, although, I understand ...
0
votes
0answers
24 views

Script not working (Function not changing value)

I have this script that I made for an FPS character. public class Player_Movement : MonoBehaviour { public CharacterController controller; public Transform camera; ...
0
votes
1answer
40 views

2d gravity simulator - smaller object orbiting towards center of bigger object

In my libgdx test game, I have initially created 2 circle objects (stellar) about which I will say more in details below. However, my goal is to simulate gravity in 2d, where smaller object orbits ...
0
votes
1answer
16 views

Help with moving object to mouse position

I'm trying to make an object follow my cursor using raycasting. I'm creating the raycast each frame and checking the player's distance from the hit and whether or not the hit landed on an object ...
1
vote
0answers
19 views

Large values for Rigidbody Velocity (UNITY3D)

I'm making a simple FPS game. I've come across this problem that I am unable to solve for quite some time. If this is question has already been asked before then do let me know. The problem at hand is ...
0
votes
2answers
46 views

Sliding movement on a grid

I'm trying to implement "sliding" movement on a simple grid, where the movement vector is continuous (floating point direction) but the grid is discrete (boolean blocked or open on integer ...
0
votes
0answers
29 views

Player can only dash towards to the top right, but can't in any other direction?

I have a dash mechanic, but it only seems to be working when the player is going up, down, left, right, or to diagonally to the upper right. It won't work diagonally in any other directions, and I can'...
0
votes
2answers
61 views

How to move one Game unit with every key press?

I have a tile board set up with 500 x 500 pixels = 1 unit. I have code that will move the object over time. ...
0
votes
1answer
13 views

How to mitigate when applying horizontal force to a rigidbody seems to overpower gravity?

I've started testing movement using the example code in this answer of making a body accelerate to a target velocity ...
0
votes
1answer
70 views

What are the dangers of setting rigidbody velocity directly for movement and what are the alternatives

I'm playing around with Unity, trying to make a neat 3rd person platformer movement system using rigidbodies so that I may in the future implement things like pushing boxes/physics objects, grappling ...
0
votes
2answers
88 views

Smooth out movement of the snake in a 2d Snake game

I am working on a 2-D snake game in C++ with the SFML library. I would like to smooth out the movement of my snake as it looks extremely choppy currently. How the Snake moves The snake is made up of a ...
1
vote
0answers
30 views

player softbody

I need some help with a softbody mechanic on a player in unity and I don't know how to approach it yet. I want to try rigidbody collision on individual sections of the mesh, or mess with the cloth ...
0
votes
0answers
23 views

What is cutoff when calculating speed in this equation?

I saw a twitter post mention the following as way to make movement frame-rate independent: ...
0
votes
0answers
20 views

Top down four directional movement snap to tiles, not feel like crap

I want to make a topdown rpg movement, I need to update these parameters based on user input: User input four directions: ⬆️⬇️⬅️➡️ . Update parameters Position: ...
0
votes
1answer
26 views

How do I make my character attack on the side of the character that I click the LMB on (Unity)?

This is a top-down game, I guess I should also mention that the character is not centred on the screen and the attack should be in 4 different directions. The attack's direction should be based on ...
0
votes
0answers
33 views

How to highlight edge of movement range

I am working on a small tactical game like X-com. I now have a working-ish version and would like to treat myself to some aesthetic upgrades! I have been thinking hard about the following but I can't ...
0
votes
0answers
85 views

How to make a moving camera in 2d with p5.js

I am trying to make a hill climb racing clone. My code: https://editor.p5js.org/saathvik/sketches/-XOFPcukt When I move the car, I want the camera to follow the player, so he can't go off screen.
0
votes
1answer
76 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 ...
2
votes
1answer
77 views

Game physics of tearing apart

For a game I'm programming I'm looking for a kind of realistic mechanic for simulating the tearing apart of objects. Let me explain: I have a given point p in a 2-dimensional space (possible later ...
0
votes
0answers
13 views

Smooth movement in point-to-move 2d game based on velocity [duplicate]

I have a real-time point-to-move 2D game with one playable character to control. I want to create smooth player movement using physics and appropriate velocity. Basic setup: The player has a maximum ...
0
votes
1answer
22 views

Orthographic Camera Movement inside Rotated Boundary Rectangle Weird Behaviour [Unity3d]

Basically I have an orthographic camera that is looking at a simple square. The camera is sitting above the square and tilted by x: 45° and y: 45°, so the camera sees the square as a rhombus / diamond ...
0
votes
1answer
113 views

Godot: Move_and_slide_with_snap not working on slopes

My Problem I am currently building a platformer game. I was attempting to use move_and_slide_with_snap for the first time and can't find it working for me. My character does snap to the ground like I ...
0
votes
2answers
26 views

Math: determining a proper procedural vector for sine-movement

My Problem Suppose you have an object moving along the x-axis, wobbling up and down. Movement code might look like this: x += 1; y = Sin(x); Move((x,y) * speed); ...
0
votes
0answers
82 views

Implement navmesh for climbing cliffs and walls

I am trying to implement dynamic wall climbing similar to Conan exiles and Legend of Zelda: Breath of the Wild. My system as of now uses a raycast to get the direction of a geometry's normal, and I ...
0
votes
1answer
51 views

How to create a projectile path in unity using physics

I want to create a jump function that launches a RigidBody2D along a low, long, trajectory. In the following examples, I have set the linear and angular drag to 0, to eliminate any possibility of ...
3
votes
0answers
84 views

Calculate the aircraft's movement path in which its side speed is required

I am working on an implementation problem in which given an aircraft and the objective of the system is to find the quickest route (optimal in terms of time) from point A (contains the information of ...
0
votes
1answer
27 views

Move objects in array with positions array

I am trying to get a line of spheres to move around but all i get is the first sphere to move and get the rest to follow as one instead of building a sort of a train of spheres. Any idea how to alter ...
0
votes
2answers
68 views

How do I stop my player or camera from jittering during player movement?

In my game, I have a third person character. The player moves with a rigidbody and has isKinematic set off with interpolate on. In the script, it moves with ...
0
votes
1answer
25 views

Attach movement to each list object

How would i move every sphere that gets spawned every 2 seconds ? Basically i want every sphere to follow the previous spawned sphere or even all N-1 spheres should follow the first spawned sphere ...
0
votes
0answers
103 views

Roguelike movement system

I'm trying to implement a roguelike movement system for my game. I'm using the ECS architecture. The requirements are: entities will have a mass, on which should slow down the entity movement ...
0
votes
1answer
377 views

Jumping up quicker? (Paper Mario style jump)

As shown here, Paper Mario's jump takes 8 frames go reach the max jump height and 12 frames to get back to the ground. This is pretty unusual, any idea how to jump up that quick with a rigidbody? I ...
1
vote
1answer
56 views

AntiGravity Vehicle?

I'm making a racing game akin to F-Zero and Mario Kart 8 with AG mechanics. I currently have a vehicle that is a rigidbody with normal gravity pointing down. True to AG games, I want the gravity to ...

1
2 3 4 5
19