A simple term for "translation", the change of position of an entity typically on the route of going from point A to point B.

learn more… | top users | synonyms

0
votes
1answer
2k views

Unity-Animation parameters are not being set

I have the following animation controller: with two parameters of walkingSpeed and Jump. I have the following code which should change the values: animator.SetFloat("walkingSpeed",0.9f); ...
3
votes
1answer
276 views

Handling touch input with Event Trigger

I wrote a simple script to control my 'Player' object: using UnityEngine; using System.Collections; public class PlayerMovement : MonoBehaviour { public float jumpVelocity = 10; ...
1
vote
3answers
71 views

How do I flip Player in 2D Touch Movement?

How do i flip my Player in 2D when i got touch movement? I got Buttons to move but how do I flip the player now if i walk to the right cause my player faces to the left..? here is my Player Script: ...
1
vote
2answers
40 views

how to handle the virtual Z axis in 2D games?

I'm using this paper 2d framework of UE4 where a plane mapped with sprite texture is put in 3d world and therefore appears as 2D when viewed from sideways. Its all good for games like NES mario where ...
2
votes
0answers
22 views

Unity3d Isometric moving forwards

I am making an isometric game using unity 3d and 3d graphics. I have been able to figure out how to create and isometric camera that follows the player, and a basic isometric moving script for the ...
1
vote
0answers
25 views

Top down controller script trouble

My game features a top down camera that follows the player as he moves via virtual joystick on a cellphone screen. I want the movement of the player to always walk forward and the direction will be ...
3
votes
1answer
87 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: for each unit: n = compute next position if n is empty then move to n If I start the loop ...
2
votes
1answer
63 views

How to compensate for moving objects with client side prediction?

I'm implementing a game server that supports Star Control-like melee. So you have ships flying and shooting, with super simple velocity/acceleration/dampening physics to drive movement. I've read ...
1
vote
2answers
33 views

Unity2D - move rigidbody object with collision

How do I move and collide my object (position given by touch or click), by Using rigidBody2D.MovePosition i can only teleport my character, and by using velocity, my character keeps moving, I want him ...
4
votes
1answer
240 views

Why does my player walk animation take so long to begin?

I'm new to Unity and after doing some tutorials and reading documentation from Unity, I've started a test project. The game is a 2.5D platformer and I wrote the PlayerController; it looks like this: ...
1
vote
2answers
57 views

Elastically Object movement in unity3d

I want to move an object towards the destination elastically. Currently I am using Vector3.Lerp it working to move the object, start with high speed and reached at destination with low speed but ...
3
votes
1answer
2k views

How to move an UIView along a curved CGPath according to user dragging the view

I'm trying to build a interface that the user can move his finger around the screen an a list of images moves along a path. The idea is that the images center nevers leaves de path. Most of the ...
1
vote
0answers
36 views

Fixing wave-like movements when rotating an object using mouse input in Unity

I have encountered a rather odd issue with my program. The setup: In my scene, I have a GameObject which I have set as my player/character for this game. The player/character has a child GameObject, ...
1
vote
1answer
115 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 ...
1
vote
2answers
84 views

PYGAME: When I release two directional keys together the player keep moving

I did the code this way to avoid the player to stop if a press two directional keys together making the movement more smooth. It works well but when I release two keys or more together the player keep ...
4
votes
1answer
114 views

2D Change Velocity Based on Distance XY While Moving Parabolic Arc

What I'm trying to achieve is that the entity moves in a parabolic curve, and no this has nothing to do with gravity before you ask. I give the entity a target position which it should move to, but ...
2
votes
1answer
28 views

Unity API - Making a Sphere Jump?

I'm making a very simple game with a sphere that's supposed to roll and bounce on "planets". Also, please be ready to read a lot. I want to be very descriptive for you. :) I've pretty-much-done ...
1
vote
1answer
602 views

How to move rigidbody player to its facing direction with AddForce?

How can I move a rigidbody to its facing direction? I've already tried this: rigidbody.AddForce (transform.forward * v, ForceMode.Acceleration); // v is a public float which gets a new value in ...
0
votes
1answer
188 views

Continuous Jumping Cycle

The script makes a GameObject jump using realistic gravity and reach a specific target. The GameObject jumps relative to the target, thus adjusting its trajectory. It also works while the target point ...
1
vote
1answer
211 views

Unity 5.2 default 3rd person controller makes character fly upwards when moving forward

I'm new to Unity and already dealing with a problem.. using the default third person controller script I am trying to move and animate player. But I have a problem that as I try to move the character ...
3
votes
2answers
247 views

How do you avoid lag with Three.js and mousemove?

I'm trying to create a browser moba-like game using three.js. I'm using WASD for movement and the player rotation follows the mouse with mousemove then lookAt() the intersection. The problem: As I ...
0
votes
1answer
61 views

Libgdx: move img from one point to another?

I'm trying to make an image move towards another point. I only have the current X/Y and the destination X/Y + Speed. That's it. public void Draw(SpriteBatch batch, int goalX, int goalY){ destX = ...
3
votes
1answer
26 views

Control Entity Moving Speed Without Using a Delay Function

In a Tetris game I'm trying to make (using C++/SDL), I need to control the falling speed of, say, one block. I have successfully done this by incramenting its y value then setting SDL_Delay(200). So ...
1
vote
2answers
337 views

Show a range grid movement as3

How do I show range of grid movement in AS3? When player controls a character and chooses "move" options, the grid of movement will be displayed as 3 grid of X, 4 grid of Y (Both sides, + and -). So, ...
0
votes
2answers
37 views

How would I make my position interpolation stop once the destination is reached?

I would like to implement tile-based grid movement and I've heard that linear interpolation comes handy in the implementation process. I've tried to use it but I'm not sure how to make it stop once ...
1
vote
4answers
104 views

Performing movement per game tick

Assume we have a player on a map, whereby the grid is represented as a floating point. When a player is moving, they have an x and y velocity. How to do you properly apply their movement each ...
1
vote
1answer
79 views

Doubts on player movement strategy

What I want to achieve is the player moving to the touched position on a 2D grid-based game, stopping at the last reachable spot if the target position is unreachable. What is the strategy usually ...
0
votes
1answer
51 views

Synchronize objects' movements moved by coroutine function

I'm using Unity version 5.3.5. I'm having problems to synchronize the movement of three different objects from point A to point B and vice versa. To move the objects I use the following code: public ...
0
votes
3answers
918 views

How would I go about making a movement system like Mario Party?

Main question How would I go about getting a movement system similar to the one they have in Mario Party only minus the dice roll? Things I have researched I have been studying the uses for ****...
0
votes
0answers
32 views

Android/Gear VR: Smooth walking with gamepad

I'm working on an Android app for the Gear VR using the Oculus SDK (Java, Eclipse) and I used this website to help me handle controller input, so I understand the whole concept of the center axis for ...
2
votes
3answers
240 views

How do I correctly make character sprite direction match player inputs?

In my top down game I can move the character around and the character will even face the direction he is moving. However, there is some weird behavior I'm having: when you hold down one direction and ...
3
votes
3answers
980 views

Frameskipping in Android gameloop causing choppy sprites (Open GL ES 2.0)

I have written a simple 2d platform game for Android and am wondering how one deals with frame-skipping? Are there any alternatives? Let me explain further. So, my game loop allows for the ...
1
vote
2answers
171 views

Determine facing direction mecanim 2d movement

I'm using this script to move my character in my 2d world: public float speed; //Movementspeed public Rigidbody2D rbody; Animator anim; void Start () { rbody = GetComponentInChildren<...
1
vote
2answers
26 views

What is a good practice for deciding when to use transforms instead of applying force?

I was making several games. I don't understand when I should use addTorque instead of rotate. AddForce instead of position The latest game was a pinball game. I wasn't sure the best way to active ...
3
votes
2answers
57 views

Bike game - following a road path

I am writing a game in java which has a bike riding down a road. I intend to add some obstacles on the road which are structures having a slope, which the biker must negotiate. In other words, the ...
0
votes
1answer
41 views

Move unit 64 pixels at a time Unity3d

I'm new to Unity and am trying to learn how to use it. I'm making a 2D top down Frogger-esque game. I was wondering how you would go about making the player move x pixels per button press. I currently ...
0
votes
2answers
920 views

How to move an image back and forth with javascript

I currently am trying to make a baseball game and have this code here: http://jsfiddle.net/769BK/ I have the baseballX set to a decrement, and then I try increasing the value using baseballX++; but it ...
1
vote
1answer
61 views

Unity question: When attaching my custom camera script camera shakes when player starts to move fast [duplicate]

Here is my player code. Rigidbody rb; Vector3 currMovement; public float jumpSpeed = 10; public float moveSpeed = 10; public float rotSpeed = 180; float distToGround; public float smoothTimePos = ...
-1
votes
1answer
51 views

Unity: When attaching my custom camera script camera shakes when player starts to move fast

Here is my player code. Rigidbody rb; Vector3 currMovement; public float jumpSpeed = 10; public float moveSpeed = 10; public float rotSpeed = 180; float distToGround; public float posSmoothTime = ...
0
votes
2answers
29 views

Moving towards and switching targets in Unity with collision

I have these nodes set up for a ship to move towards over time with out looking stops then repeats in a sequence. like so: 1 2 3 1 2 3 1 2... THE PROBLEMS i keep having either come from the ...
3
votes
3answers
93 views

Does AddForce continue to add force indefinitely?

Does the AddForce method continue add velocity to an object forever? Does it need to be limited by another line of code? Sorry if it is too broad or too simple; I am completely new to programming and ...
0
votes
2answers
37 views

Updating GameObject Position in Unity 5

I have a simple Sprite called Player that has the follow components (Transform, Sprite Renderer, Box Collider 2D, Rigidbody 2D, Player Controller Script). In my Player Controller script I want to ...
1
vote
2answers
104 views

Moving a character to a point without any floating point operations

So I'm writing an adventure game for MSDOS, just a fun challenge for me. I'm trying to get the character to walk along a straight line to his destination (either the next navMesh node or where you ...
0
votes
1answer
105 views

How to achieve 2D ski movements similar to Alto Adventure?

I'm trying to achieve 2d movement similar to Alto's Adventure with Unity 2D. When grounded I want the character to slide alone the terrain parallel to the slope, but I want to be able to freely rotate ...
4
votes
1answer
82 views

Move Sprite in constant speed on squircle

I'm creating a game and i need to move a sprite on squircle path. https://en.wikipedia.org/wiki/Squircle i created the path using the equation : angle -= Gdx.graphics.getDeltaTime()*speed ; ...
0
votes
2answers
37 views

Autonomous robot - moving from 1 object to the next object

This question falls in line with my last question: Unity 3D - create autonomous moving robot in house + first person camera movement What I have I have a 3D model of a house; a first-person camera ...
0
votes
1answer
77 views

Unity 3D - create autonomous moving robot in house + first person camera movement

I have very, very little knowledge about programming or Unity. I have done some basic tutorials, but I want to try something harder. The thing is, I don't know where to start. If you find the time to ...
0
votes
1answer
66 views

How to decide between strafing, turning etc for lateral character movement? [closed]

I have been studying the character movement of many 3rd person games. But just when I think I have come to understand the conventions or found a pattern, it seems I come across another game which does ...
-3
votes
2answers
289 views

Random AI Movement

So I'm creating a zombie game where the zombies are passive and just walk randomly all over the area when player is not near. My question is: how would I make zombies move randomly? I code in C#. ...
-4
votes
1answer
21 views

Problem in moving object on movement of mouse cursor in unity [closed]

I was watching a tutorial on how to move objects on mouse movement. https://youtu.be/7OJQ6MbHuvQ this is the link to that tutorial and below is the error I got while scripting. Pleas watch the whole ...