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
6 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
31 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
49 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
17 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
16 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
25 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
32 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
24 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
58 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
75 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
8 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
44 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
36 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
25 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
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
51 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
24 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
90 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
276 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
76 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
34 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
33 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
83 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
34 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
246 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
72 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
49 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
82 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
234 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
12 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
21 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
32 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
71 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 ...

1
2 3 4 5
18