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
1answer
1k 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 ...
0
votes
1answer
35 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
51 views

How can I force my Navmesh agent to only move four directions? (for 2D)

I'm making a 2D game in Unity. For 2D I am using the NavmeshSurface2D-plus master package available on github. My enemy object is chasing my main character nicely, it's ok. I set my main character to ...
1
vote
0answers
18 views

Calculate 2d rotation to target (uniformly accelerated rotation, constant speed)

I'm trying to calculate an uniformly accelerated rotation for the autopilot module in my 3d space game shooter. The autopilot should fly the spaceship to any given point in the 3d space on the ...
0
votes
0answers
26 views
0
votes
1answer
670 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 ...
0
votes
1answer
57 views

Swipe to move script does not move exactly one unit

I am currently trying left & right, up & down swipe motion in unity C#. I have done the scripting, it all working, but after I debug the script, the object's position suddenly changed to a ...
0
votes
1answer
395 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 ...
0
votes
1answer
18 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
1answer
53 views

Rotating gradually in response to input, instead of snapping

I'm trying to replicate Silent Hill's mechanic where if you press a button, the character does a 180, but instead of getting a smooth turn around, my character is snapping from one rotation to another....
0
votes
2answers
86 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. ...
1
vote
1answer
105 views

How do I move my infinite runner player when the game zone shares the screen with a match 3 game?

So I am seeking to make a Match 3 with an infinite runner element. The match 3 portions are all already totally done, but I'm running into trouble figuring out how to best approach the Runner portion. ...
3
votes
1answer
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 ...
1
vote
1answer
197 views

How to prevent a sprite to move in an angle that will lead to collision

I have two sprites that can move in any angle. The sprites are rectangular. I created bounding boxes for both the sprites. These boxes rotate whenever the sprite rotates. They always surround the ...
0
votes
1answer
31 views

Animation and Movement -- Prototyping Efficiently

I'm a solo dev working on prototyping my game's movement system. My character is intended to be agile and lightweight, with quick movement options and a knack for climbing. As we know, the key to ...
0
votes
0answers
35 views

Pygame : having trouble with implementing movement with vectors

I've been struggling a lot to learn how to use vectors in programming. Now I've successfully made my own vector class but I still can't use vectors for movement. This is my class : ...
3
votes
1answer
188 views

Correct order of entity updates and collision detection

I'm trying to simulate a number of units walking in a single file. My update loop looks like this: ...
4
votes
1answer
209 views

Issues with player movement and character interaction within Pygame

I am working on a small game that deals the main character, which is a cat, and dogs that chase it. The dogs are able to wander around like they are supposed to do, but the cat will only move a small ...
0
votes
1answer
314 views

Colliders slightly intersecting each other; any solution?

Consider this simple scene: In Unity, colliders slightly intersect each other. Typically, this isn't a problem. However, I want to make a custom character controller using a box collider and not a ...
1
vote
1answer
6k views

Moving object to point a to point b smoothly

I am working on a problem where distance between the point A and B or given and object of interest should move smoothly from A to B. I can control only control the speed of the object using this ...
0
votes
2answers
230 views

Annoying snag when moving with dx and dy JAVA

I am currently using a keyAdapter with detectors and when I move I change the value of dx and dy respectively. However if I move left then right or up then down quickly, the sprite won't move in the ...
2
votes
3answers
2k views

8-way 2D top down movement (diagonal) idle animation issues

Background I am working on animations for 8-way movement for my character and have done the 8 directional running animations using a blend tree. Now I need to do the same for the idle animations. ...
0
votes
1answer
261 views

libgdx Player movment dungeon crawler

The player go's throe walls and stops when theres no wall. Code: ...
4
votes
2answers
1k views

Controlling roll rotation when travelling along bezier curves

I am currently working on a curve implementation for use in Unity which includes an editor: The aim is to get an object to follow the path represented by the curve at a constant velocity. Currently ...
1
vote
1answer
389 views

Character Movement - Canvas Character - Javascript

How do I change the arrowkey movement so that is based off of the click of the buttons instead? Cheers ...
0
votes
2answers
104 views

Pushing an object left and right (gravitation towards center of a circle)

So this is the problem: I have an object pulled towards the center of a circle and I am unable to figure out how to move the object left and right depending on its rotation around the circle. I ...
0
votes
1answer
649 views

Unity Mobile project, button problem "CrossPlatformInputManager.GetButton" not working

Good afternoon, I have a problem with an input in my code: Before testing it on mobile I tried on PC and the code to make my player sprint was like this: ...
0
votes
1answer
167 views

NPC Melee fighting movement issue

So i have been struggling with this for ages and I have now decided to reach out for help. The Problem: The game has two NPCs for reference we will call them "Ally" and "Enemy" Ally and Enemy each ...
0
votes
1answer
144 views

Make object follow another object like a dog sled

I'm trying to achieve the effect of a dog sled for a small prototype. All my attempts failed until now. I have the following code (inspired from this) ...
0
votes
0answers
18 views

How to select one game object and move it?

For example, I have two game objects, cube1 and cube2, in a scene. I want to be able to click on one and move it. I know how to use ray to highlight it, like below: ...
1
vote
1answer
317 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 ...
0
votes
1answer
727 views

How can I get the speed of finger drag using unity TouchPhase.Moved?

I'm making a mobile game where you control a 3d ball by touch. So far I can get it to roll based on finger down and drag (via TouchPhase.Moved) but I want to be able to detect a fast flick or finger ...
1
vote
1answer
33 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 ...
3
votes
1answer
522 views

AS3 move object to a point

I'm trying to make a room full of monster each side and the player stay in the middle. I have a problem, I don't know how I move each monster to the player and rotate each of them to face the player, ...
11
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 ...
0
votes
1answer
6k views

How to make my character double jump in unity3d using CharacterController?

I can now control my character in air, I used Unity's CharacterController.Move docs, but now I need to make my character double jump. Here's the code. ...
0
votes
1answer
90 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 ...
2
votes
1answer
175 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 ...
0
votes
1answer
29 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
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
1answer
131 views

Move player in a circular manner

i'm creating a pong game for learning purpose and decided to have the Paddle moving freely but with a slight change in its control. When pressing LEFT OR RIGHT it should move in polar coordinates ...
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
2answers
73 views

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

This script is attached to each drone. ...
0
votes
1answer
69 views

Move a ball horizontally left and right but restricting forwards and backwards motion unity 2d

I am trying to develop an endless runner where there is a sphere as the player and it is moving left and right following the position of a finger on a touch screen. However, when I try to do this I ...
0
votes
2answers
116 views

SDL2 Block collision with player Bug

I am currently working on a small 2D Games Engine with SDL2 for fun. The engine works in a way, that you can define a tileset, which accesses the engine and allows you to place tile by tile on the ...
0
votes
1answer
34 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
34 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 : ...
4
votes
3answers
548 views

Sphere to plane collision never rearching resting contact

I have been trying to have a sphere to plane eventually lead to the sphere coming to a resting contact, but my sphere will end up always bouncing forever. It will bounce correctly for the first few ...
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
184 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
2 3 4 5
20