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
21 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 ...
1
vote
0answers
23 views

Problem making shooting follows an actor/object

At first I created an actor to be a projectile, he acts with a simple projectile. When generated it goes straight, anyway... To do this, I added the Projectile Movement component. It turns out that ...
1
vote
1answer
35 views

How to ensure my Sine Wave movement starts from the middle-line of the wave

I am trying to make an enemy for a space game which has Sine style movement. I pretty much have it working how I want, but right now I have to manually fiddle with the 't' value to make the wave ...
0
votes
2answers
60 views

Using delta time for movement

I'm currently involved in a college assignment where we must create a game with our own game engine. In my game, we have an enemy moving around with paths constructed with a A* algorithm. Every frame ...
0
votes
0answers
20 views

Rotating a vehicle to match a 2D slope

I have a vehicle that needs to move on a randomly generated terrain and handle slopes. I'm not using wheels, but instead moving the vehicle with velocity. The ideal case would be if I can make the ...
1
vote
1answer
72 views

Monogame - Collision not working and invisible walls

I have recently been experimenting with Monogame and XNA (moving from Gamemaker) and decided to work on a simple collision system. Problem is shown in the GIF. Main Collision Each entity (Quick name ...
0
votes
0answers
37 views

Seek a point with a final velocity

I've read a little bit about steering behaviours and I want to implement something similar to seeking, except that I would like my object to arrive at the target at its maximum speed in a specific ...
2
votes
2answers
144 views

FPS Character Controller movement - Any value in reverse engineering movement formulas?

From what I know character movement in popular FPS games tend to be non-linear, but the easing curves change between games as each has its own signature formula. Typically I imagine the physics ...
-1
votes
0answers
27 views

PyGame Freezes Changing the “y” Rect

I'm trying to the Sprite DualBone to the left using a while statement. My script is ...
0
votes
0answers
19 views

3D player movement with Unity's new input system

So, I trying to get used to the new Unity input system. "Back in the days" I just got the Vertical/Horizontal axis, put them into a Vector3, multiplied them by a certain value and then moves the ...
0
votes
1answer
27 views

The camera goes up and down when following a rolling sphere

I have this CameraController script attached to my camera, to follow a sphere that moves using WSAD. ...
0
votes
1answer
18 views

Prevent Wall Clipping with Bouncing Shape

I'm currently working on a demo-type program involving bouncing objects. Currently, I have a rectangle that can bounce around the screen. When the rectangle bounces against one of the walls ...
0
votes
1answer
152 views

How to design components for tile-based movement in an RPG using ECS

I'm trying to re-write a small game of mine using ECS mostly for educational purposes and to see if it fits top-down RPG games in the style of Pokemon (gameboy). Since everything is tile based, ...
0
votes
0answers
19 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 ...
1
vote
2answers
154 views

Efficient collision detection of sphere with wall

I'm building a first-person game where up till now the player has been represented as a dimensionless point; this makes collision detection really easy, as I can just cast a ray along their velocity ...
1
vote
1answer
56 views

Optimizing Hitboxes

Way over 90% of the performance cost seems to be coming from colliders parented to animated bones. If I disable Motion & Animation I can spawn 20 soldiers with around 1ms cost on my mid-low end ...
0
votes
3answers
134 views

How do one NPC follow a succession of target points?

I have a project that contains 1 NPC (AI) and 2 target points. In the project I can make the NPC follow any of the 2 target points, but I can not get it to follow target point 1 and then target point ...
0
votes
1answer
36 views

Movement velocity relative to a static object (Vector Maths)

I have a static object. I have a moving player. If the player is moving directly towards the object then I want to return the value of 1. If the player is moving directly away from the the object ...
0
votes
0answers
9 views

Rotated movement in Gear VR Unity

So the player can move in four direction - forward, backward, right and left. But the forward direction should be from wherever he turns his gear VR controller. I have tried the below code, but when ...
0
votes
0answers
15 views

Changing controls in a new scene

I currently have a 2.5D platformer in the works for a college project, and the character can be moved with left and right. However, when entering a particular new scene, I want the character/player to ...
0
votes
0answers
11 views

How to switch between 2 game object while having it move at the same position?

I've been trying to make 2 input which change the state of a game object into another by setting one active and another inactive alternatively. But when you're in one state and you try to input the ...
0
votes
2answers
69 views

How do you make a object that always follow another object?

I'm trying to make a game object follow another game object and switch to another when a button is pressed. But right now it just seems to change the position when the button is pressed but it doesn't ...
0
votes
0answers
42 views

Smooth network movement lunge (UE4)

I am working on a melee in Unreal Engine 4 that lunges towards an enemy until it reaches it and applies damage. I have tried various approaches to get the movement looking smooth on the local client. ...
0
votes
1answer
43 views

How to properly handle sending arrow-key movement data to a authoritative server?

I've made a little C# server which receives UDP packets and shows me the incoming information. I want to make an authoritative server in C# which simulates character movement and interaction in a 2D ...
0
votes
0answers
26 views

when my cube touch the collider then stop my cube? [duplicate]

I put Box Collider on my obstacles but not stop my cube when touch the collider i try some code but nothing will be happen. ...
1
vote
0answers
56 views

Junk movement with steady 60fps on Web canvas

I'm new to building games on canvas, and I'm trying to create one. But I encountered a problem with sprite movements. My sprites move is smooth, but sometimes it starts to "jump". FPS is stable 60 ...
0
votes
1answer
38 views

How to make an object towards the mouse on one Axis - Gamemaker Studio 2

I am trying to have my "obj_playership" move towards the Cursor on a single Axis. Prefer it to be the Vertical Axis. I tried doing this is an "Execute Code Box" in a step event "direction = mouse_x" "...
1
vote
1answer
27 views

jumping and movement with rigidbody2d.velocity, gravity problem

i'm making a 2d platformer and i move my character with rigidbody2d.velocity swiping up to jump and moving while holding the left or right side of the screen. the problem is that when i jump and i ...
0
votes
1answer
71 views

How would I move something around inside of a sphere without it going outside of the sphere?

I want to be able to do this, but not go outside of the 4.4 meter limit, the radius is 4.4 meters, and it has zero gravity and no friction. I have a hard time explaining this, but imagine holding a ...
-2
votes
1answer
35 views

Moving a 2D object up & down y axis within certain limits

This was originally written to move a 2D object along the negative x axis. Now I also want to move the same 2D object along the y axis (up and down within certain limit and at different speed than ...
0
votes
1answer
176 views

Unity3D: Replicating SM64 turning movement into Unity

Brief Summary: I want to recreate Super Mario 64 turning movement into unity without the clunky movement I currently have. And I would also love how to implement the camera rotation system mentioned ...
0
votes
1answer
40 views

How to add undulation to a constraint-based chain?

I have a constraint-based chain composed of segments where each of the terminal segments has a fixed position. My constraints are set up as follows: ...
0
votes
0answers
34 views

How to make mobile movement using CharacterController

How can i change my movement for mobile i think left and right gonna work but i don't know what should i do for jump ...
0
votes
0answers
30 views

How can I stop my character's velocity in only one direction?

I'm moving a character by setting its velocity. It works perfectly and stops how I want it to however when I'm moving forwards and sideways at the same time and I stop moving either sideways or ...
0
votes
1answer
43 views

How do i prevent my player from walking through mesh collider

I have a character being moved using rigidbody.moveposition and I have an floating lowpoly island with a mesh collider. When my player walks into a steep slope or a wall, it passes right through. I ...
3
votes
3answers
116 views

How to implement smooth wandering on an annulus?

I am creating a 2D action platformer and want to create some steering behavior for a mage enemy. Basically, I want the mage to smoothly wander inside an annulus centered on my player. Below is an ...
0
votes
1answer
178 views

The character does not stand still on the moving platform

I'm trying to create a simple platforming game. I have an animated platform moving in 2 opposite directions. I use this simple code to make the character move along with the platform while he is ...
0
votes
0answers
36 views

Why does my character's collider only jumps with the animation while walking?

My character's collider only jumps with the animation while walking. And when he runs he gets stuck in the air and can walk in the air. Here's my script for jumping. At this point I have tried ...
2
votes
2answers
180 views

How to program smooth player 2D movements

I am writing a simple 2D game in Rust, having access to the following dependencies: Piston: for the graphic engine nphysics: for the physics engine The genre is Metroidvania, the game features a ...
0
votes
1answer
28 views

Why is Camera turning with different speed than Player with same code in different scripts? (with unity)

I want to integrate a running character in my game, so I downloaded the animation via Mixamo. The player is running and if I attach the camera directly to the Player it's shaking the camera and the ...
0
votes
1answer
62 views

Simplest way to make a car follow a route

To get the cars to follow the circuit, I mapped the circuits to several points. And using the move_towards_point function I make everything happen correctly. In ...
0
votes
0answers
252 views

How to get one KinematicBody2D to push another?

I am working in Godot 3, where my player is a KinematicBody2D. When I collide with a block which is also a KinematicBody2D I'd ...
2
votes
0answers
50 views

How to properly write “stick to surface” character logic that handles unexpected large time deltas?

I've been trying to wrap my head around this issue: in a 2D platformer game (but this may as well apply to 3D games) I want the character to "stick" to the surface that it's moving along and at the ...
6
votes
1answer
336 views

How do I store destructible terrain that characters can walk on?

I'm trying to make a 2d game like Worms (in JS, if it's important). I found 2 possible ways of implementing destructible terrain: Bitmap. Store every pixel in a huge 2-dimensional array Represent the ...
0
votes
2answers
139 views

2D character movement

My character moves right and left correctly, I want to know if it is possible to move character forward and backward to collect hearts (I know that in 2d no z axis I want to know if it is possible ...
0
votes
1answer
96 views

How do online games deal with lerp overshooting?

From what I understand, when you lerp in an online game, you travel from point a to b based on the elapsed time since the last update. The problem is when you have a higher latency, and you start ...
0
votes
1answer
86 views

Drag object with mouse in diagonal direction

I have a gameobject which i want to move using mouse. Currently i can do that in x-axis and y-axis: ...
2
votes
1answer
108 views

How to implement swooping movement?

I am trying to code some swooping behavior for a flying enemy in my 2D platformer. The ideal behavior has the enemy starting from an arbitrary height above the ground, then accelerating downward and ...
1
vote
0answers
42 views

How to implement back and forth steering behavior?

I am trying to implement some behavior for a flying enemy in my 2D platformer. The desired behavior is for the enemy to fly back and forth across the player, harrowing him. If the player was ...
0
votes
2answers
129 views

How to mitigate speed effects on moving platforms?

I am implementing horizontal moving platforms in my 2D platformer. The way it's implemented currently, when my player lands on a moving platform, he is reparented to it so that his position updates ...