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
30 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
59 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
12 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
7 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
0answers
17 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
25 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
27 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
21 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
82 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
26 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
48 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
23 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
84 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
199 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
55 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 ...
0
votes
1answer
67 views

ECS: Movement system

I'm a game developer enthusiast. I've decided to implement a game, however I'm pretty confused about all the movement mechanics (kinematics). Here goes a couple questions: Velocity x acceleration x ...
0
votes
1answer
27 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....
2
votes
2answers
32 views

Gradual strafe rotation with focus on mouse (circle-strafe)

I'm pretty new to Unity and C# programming, and am trying to get a player-controlled object to do a controlled rotation around the mouse pointer. The functional purpose is to be able to circle-strafe ...
0
votes
2answers
32 views

How to calculate a movement Vector3 to kill unnecessary momentum and start moving in the right direction?

Imagine a rocket is accelerating in a straight line toward PointA, picking up momentum every frame, then suddenly decides it wants to go toward PointB instead. It can't just turn straight toward ...
0
votes
1answer
57 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
votes
1answer
32 views

How can I get the basic Unity player controller to move based on a gameobjects rotation?

I am making a basic movement script based off of the built in playercontroller in Unity. I am trying to get the Player gameobject to move forward based on its own rotation (i.e. if it is rotated to 90 ...
0
votes
0answers
170 views

Apply external effects to player movement

In a 2D downhill game with the following, custom movement code, how do I apply external effects to the player's movement? For example, when the player hits an obstacle, I want them to get bounced off ...
0
votes
0answers
47 views

Why is my movement not smooth and jagged?

My game isn't smooth, it runs at 60 fps but has quick lag spikes just under every second. I really can't figure out why. I have a feeling it's to do with my player movement code. My rigidbody's ...
-1
votes
1answer
70 views

My character is not switching right or left like subway surfer in 2D?

I am making a 2D subway surfer type of game right now and I found this code on the internet that switches the lane of the player but the problem is it doesn't switch. When I play the scene it won't ...
0
votes
1answer
16 views

Why doesn't this movement script work, while the other one does?

Im trying to get a rigidbody2D to move around and got it working with this script: ...
0
votes
1answer
48 views

move along given path relative to the inital position

how can I move an object along a path "relative" to its inital position? I want it so if the object is initially positioned "around" the path instead of in the center, it will move along the path ...
1
vote
1answer
80 views

Javascript snake game, configurable section distance

I want to make a snake game. In a classic game the snake moves in 4 directions, I want the player to move in all directions by mouse input, similar to slither.io Right now the tail section changes ...
0
votes
0answers
23 views

Clamping after forcing aspect ratio

I'm using the following script to force aspect ratio of 16:9: https://forum.unity.com/threads/force-camera-aspect-ratio-16-9-in-viewport.385541/ It works perfectly. However now my game objects are ...
0
votes
0answers
17 views

Movements don't work the way it should

I'm trying to make some basic animation, but I ran into this problem. Whenever I move with WASD, it teleports instead of doing the walking animation. Also the idle plays only one time, then it stops: ...
0
votes
0answers
9 views

Moving object along X and Z plane relative to camera

Using keys, I'm trying to move a cursor object across the X and Z plane, keeping it relative to a camera that I can orbit around the playfield. This is my code so far, and apologies...I'm about 2 ...
0
votes
1answer
33 views

Is Updating Sprite/Entity Movement Using Framerate Necessary?

Apologies if this is a dumb question I'm still new to this, but I'm trying to understand if calculations of sprite movements/hitboxes/etc. is necessary or is generally better than just using fixed ...
0
votes
0answers
11 views

How do I select my platform and move them in a specific place in gameplay?

I saw this game called TaniNani and I was amazed by the concept of the game and I would like to try to replicate it! My goal is to let the player hover on the available grid (somehow like hovering ...
0
votes
1answer
135 views

Unity: AddForce in transform.forward direction not working as expected

I am building a very simple car-driving game in Unity. I have a Player object, which looks like this: As you can see, I have a Rigidbody2d component attached to this object, as well as a script, ...
0
votes
0answers
10 views

Clamp 2d not working in Main scene (Godot3.2)

In Godot3.2,clamp2d(Player) works in standalone scene but doesn't work when instanced in Main scene(both as Child node through Scene ui and as a Packed Scene ...
0
votes
0answers
21 views

Why does rb.velocity blurrs background?

My player controller code is bellow. So is my player inspector. This makes my character move yet it blurs the background, but when I use ...
0
votes
0answers
17 views

Character either stuck in idle or character animation in unity

Im making my first game in unity. And Now I have this problem: my character is stuck in his running animation and I can't move him at all (when I'm trying to play the game). There is also this weird ...
0
votes
0answers
31 views

Player losing alignment with tilemap after moving

I'm using an isometric tilemap(2:1) and I can't figure out how to make grid based movement on it's surface. I managed to get a code working for the grid based movement, moving my character with 0.5 ...
0
votes
2answers
67 views

How to increase points per second when speed increases

I am making an endless rider game that is crossed between tron legacy and cube field. I am trying to add a point system were the faster you go the more points you get because you are more likely to ...
0
votes
0answers
30 views

Unable to use a velocity value when using KeyInput

Heres the code for the KeyInput ...
1
vote
0answers
21 views

What is the better form of movement for a vehicle that the player is inside of?

I am using unreal engine 4 to make this. Basically I have a submarine that the player can move around in and can control the submarines movement within an ocean. However I don't know the best way to ...
0
votes
0answers
37 views

How to check public bool of different script in C# - Unity [duplicate]

I seem to have some trouble with a problem that I feel should be really simple, but I've been beating my head against this for a few hours and I can't seem to figure out what the hurtle is. What I'm ...
0
votes
0answers
22 views

Unity with move gameobject line renderer

I create DrawLine class, I want my character to follow the line I draw. How do I move my character on draw line renderer ? Thanks! ...
0
votes
1answer
26 views

Ways to move a character in Unity

I am studying Unity, and so far I encountered three different ways to move a character. As far as I understand: Directly changing the transform - ignores both physics and colliders; Using a ...
2
votes
2answers
255 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
0answers
27 views

Change hero direction in place before movement on a grid based game in Unity

I've already implemented a grid based movement with all the necessary animations. Now I would like the make the hero face the direction of the input without moving first and move only if the input ...
1
vote
0answers
23 views

Artifacts on top of platform sprite only when moving

I made a floating platform in Unity which has a propeller movement animation. I attached a script I wrote to the game object that adds slight vertical and horizontal movement using the game object <...
0
votes
0answers
6 views

(2d) Error pops up when handling enemy knockbackS [duplicate]

So I created some code that will make the enemy take knockback upon taking damage from the player. I put this behaviour inside the EnemyInheritance script so that every enemy I have in the game will ...
1
vote
1answer
40 views

Moving Rect with KEYDOWN

I tried to move my obstacle with the event type KEYDOWN, but it seems it is not working. This is my code. ...
0
votes
1answer
55 views

Why does my character move diagonally?

So i've been trying to make the player face towards the direction i pressed. That part works just fine but when I try to move the player it moves diagonally instead of left/right. Any clues? ...
0
votes
0answers
24 views

Grid base movement shader

I am currently working on a turn-based shooting game (X-Com Western Theme). I really like the shader effect used in X-com which highlights the edge of the movement zone. But I cannot think of an ...

1
2 3 4 5
18