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

Rolling a circle around a square

I am stuck on a simple Box2D task. I have a box and a ball (in top-down view so no gravity), and I would like the ball to roll around the box. Here is my code. Basically now I am trying to detect ...
0
votes
0answers
45 views

How do I make my 3d cube move left and right with buttons in Unity with RigidBody.AddForce?

How do I make my 3d cube move left and right with buttons in Unity with RigidBody.AddForce()? I can't figure out how to do this in Unity! I'm trying to make my game ...
0
votes
0answers
17 views

can't achieve a smooth movement with ShapeRender

I am using ShapeRender to render Circles and in the update function on every loop I update the coordinates that represent my ...
0
votes
0answers
16 views

Implement a scale factor to apply to UCharacterMovementComponent::JumpZVelocity in Unreal Engine 4

I'm creating a my own movement component inherited by UCharacterMovementComponent. I should implement a scale factor (I called it JumpZVelocityScale) to apply the JumpZVelocity (and I don't want ...
1
vote
1answer
16 views

How do the PhysWalking and similar functions actually handle input?

As the title may suggest, I'm developing a CustomMovementComponent and I'm on the stage where I am developing my own PhysCustom ...
1
vote
1answer
69 views

In a MovementComponent, where should I initialize member variables?

I have a MovementComponent derived from CharacterMovementComponent MovementComponent, ...
0
votes
0answers
22 views

How to use a derivative of CharacterMovementComponent

I'm developing a 3rd person platformer. My Character class (the default third person template class): PlatformerCharacter : ACharacter My MovementComp class: <...
0
votes
0answers
17 views

Add touch screen support to tile navigation

I saw this awesome tutorial that is related to Grid-based Movement in Godot What I want is to add touch screen support for this kind of movement i.e. with virtual on screen joystick or gestures. How ...
0
votes
1answer
43 views

How to handle forward/backward movement in an oblique top-down view

I'm making a pseudo-2D top-down game, where my assets are actually 3d but I use an orthographic projection to introduce more depth. I saw a picture of how the game "Enter the Gungeon" was actually ...
1
vote
0answers
20 views

Smoothing long paths with splines

What is the best way to smooth a long path with splines? I first implemented a Bezier curve but then realised that I would have to join a lot of them. I used A* on a weighted grid so I can't use ...
0
votes
1answer
56 views

Higher order splines for use with pathfinding

In this page, Amit explains that splines can be used to achieve movement on a found path. In the picture below, he explains that: The blue paths use splines, with dark blue being low order ...
0
votes
0answers
40 views

How does CharacterMovementComponent::PerformMovement work?

I'm developing an adventure platformer. As such, the manipulation etc. of the CharacterMovementComponent is going to be crucial to the game. I have seen the more ...
0
votes
1answer
37 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
1answer
47 views

Simple 2d Movement (Non platformer)

This seems so simple but my searching as failed to find a good result. The idea is that you can move in 360 degrees but you aren't faster when you move in a diagonal direction. I know how to do this ...
0
votes
2answers
107 views

Why is my player movement code not working?

I'm trying to make my 2D character able to float around the screen, but my code isn't working: ...
0
votes
1answer
43 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
0answers
24 views

Calculating stopping distance while turning

I need to calculate the movement of an object that is slowing down to approach its destination while turning. Calculating the linear stopping distance and deceleration is straightforward. However if ...
1
vote
1answer
110 views

Tile based smooth snake movement

while making my own Snake implementation I decided to use delta time for smoothing movement on screen. The problem is that before Snake was moving fixed amount of pixels every frame, but now when ...
0
votes
1answer
57 views

Calculation of distance while switching between two speeds

There are two speed values, that are used by moving object. After a while speed switching occurs from V1 to V2. I need the formula that can be used for calculation of current distance (at specified ...
0
votes
0answers
27 views

Unity 2D game object moving up in curve?

How can I make a rigidbody2d game object moving up curve like the attached screenshot?
1
vote
2answers
107 views

Unity 2D: Smooth ease-out movement on grid

I'm trying to create a grid movement in Unity, as where the player will ease-out on a tile when stopping, but I can't seem to get it right. I need a little nudge in the right direction for how to ...
0
votes
1answer
84 views

Unity: Move Collider up stairs/ramps

The bots have a simple Capsule collider which cannot tilt. Movement is applied across the horizontal axes, gravity is enabled on the rigidbody. It moves up stairs okay with steps roughly 0.2 units ...
0
votes
1answer
63 views

Unity 2D launch player towards mouse location

few notes: I'm new to game development I'm not new to developing (1 year of front end web development) I'm trying to get my character to launch towards mouse left click button (which I understood to ...
0
votes
3answers
68 views

How do I prevent players from flying too low in an infinite sky?

Let's say I have a game that allows the player completely free, open world flight, and the world itself is a bunch of floating islands. This creates some problems with flying too low, such as reaching ...
0
votes
1answer
41 views

Character doesnt move along with his rotation

Decided to change my character movement from transform.Translate to a rigidbody movement, the only problem is that my character is not moving to where he is facing, also it falls really slowly in the ...
1
vote
1answer
20 views

Verlet chain with two fixed points is not converging properly

I am trying to create a simple chain between two fixed endpoints. The problem is that I can't seem to get the chain to reach a stable state. Further, the chain is always biased toward one of the ...
3
votes
3answers
175 views

Improve velocity obstacle calculation algorithm/performance

My goal My goal is to calculate the (velocity) obstacle that is imposed by unit B onto unit A. So I want to calculate the velocities from the center of unit A (circle) that will lead to a collision ...
2
votes
2answers
98 views

Make a bullet move towards the mouse position

Before you give me a link to another post look first, just in case. So I'm making a top down game where the person can shoot around, I want the bullets to move towards the mouse, I have tried this: <...
0
votes
0answers
25 views

Why is not the projectile going toward the target?

I have a project where I can shoot (with a simple projectile). Character Blueprint (generate projectile): However I would like to be able to make the projectile go towards a specific target. ...
0
votes
1answer
78 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
1answer
42 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
51 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
83 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
36 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
108 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
38 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
171 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 ...
0
votes
0answers
39 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
2answers
51 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
27 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
2answers
258 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
2answers
50 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
195 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
58 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
211 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
37 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
13 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
17 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
3answers
139 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 ...