Rotation is the circular movement of an object around a specific axis.

learn more… | top users | synonyms

0
votes
1answer
22 views

Unity's animation system is flipping out. Rotates only the long way around

I really dont know what is going on or how to even explain the problem so I made a gif. Its not a really well made gif so please bare with it.
0
votes
2answers
31 views

Rotate character 180 degrees determine direction

In my game it should be possible to rotate the character 180 degrees. I always want the character to rotate clockwise. If the character is rotated 0 degrees and I press the rotate button, the ...
4
votes
1answer
55 views

How to make one 3D object face another?

I'm writing a simple 3D engine myself and I cannot figure out how to make one object face another. The problem begins with identifying which direction the target object is in relation to the second. ...
-1
votes
0answers
28 views

Which is better between animaion and Script for rotation

To Rotate a particular object in unity, which way is better? Rotating it by animation or by applying rotation from script.
1
vote
1answer
49 views

Unity Rotation - Object is rotating on Z, but should be rotating on X

I've been working on a project where I have a cube. When swiped left, the cube will rotate 90 degrees the left, and then when swiped right, the cube will rotate 90 degrees to the right. I have this ...
1
vote
0answers
37 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
2answers
45 views

Rotate directly towards a target at a constant speed

I've written a program (see on JS Fiddle) that rotates my player towards the mouse cursor at a constant speed. I've computed the angle to the point using the Math.atan2 function, but when incrementing ...
1
vote
0answers
44 views

Moving along the surface of a mesh?

I'm trying to replicate the movement in this game: https://www.youtube.com/watch?v=OcvD8BXars8 The players ship along with all other game elements move along the surface of a mesh. I've tried ...
0
votes
0answers
7 views

Cocos2d How to get Smooth rotation of sprite when using Sprite->setRotation()

i have simple round circle joystick when i move the thomp on the circle joystick it moves simple sprite so when i get for example 40 Degress in the joystick i set the sprite setRotation(40) all this ...
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 ...
1
vote
1answer
61 views

Check collision between two rectangles - libGDX

I'm making a game in which the objective is to collect the maximum amount of balls(Rectangle) to get the highest score. The balls spawn randomly from the middle of every side of your smartphone, and ...
2
votes
1answer
66 views

How to correct this issue with a top-down aiming angle in Unity - 2D?

I'm trying to build my first project and I'd like some input for a math correction. The game is a top down 2D shooter, a bit like the iconic "chaos engine" from SNES. The issue is that either the ...
0
votes
0answers
13 views

camera rotation animation problem

I would like to create a 3d person rotation where the camera rotates to the character rotation(follow camera which orbits around the character). It might be possible that the character rotation ...
0
votes
0answers
31 views

Position camera in opengl

I have a camera with a 3D vector that represent the position and a quaternion that represent the camera orientation. I'm trying to rotate and orientate the camera correctly, but I can't. I know that ...
0
votes
1answer
47 views

How to calculate a simple swivel rotation? (no physics engine)

Assuming i know the geometry and the rotation angle of a cart, how can i calculate the rotation angle of a swiveling wheel? To get the rotation angle of the wheel, i tried by calculating the ...
0
votes
0answers
20 views

Rotating a UI arrow according to the change in camera's rotation

I have been trying different alternatives to do what is a very basic thing but I couldn't have any success. What I want to do is this. I have a 2D UI sprite at the screen, formed by 2 triangles, with ...
0
votes
0answers
26 views

Rotate camera with quaternions

I have a camera with a 3D vector, the position, and a quaternion, the orientation. I'm able to move the camera in a realistic way (respect the local axis) but I can't do the same with the rotation. ...
2
votes
1answer
43 views

2d vector flips during rotation

I have a 2d game (C++ and SDL) and I want the player object rotate to follow the mouse. The player object and the mouse location are both stored in 2d vectors. In order to have the player's rotation ...
0
votes
0answers
40 views

How do I rotate enemies on NavMesh in Unity?

I have a NavMesh Script for my enemy but it just looks into my direction and if I run around him he is still looking in one direction and not turning and facing me, how can I rotate him in the script ...
1
vote
4answers
103 views

How can I min-max quaternions?

What I'm doing In my engine, I'm trying to implement a camera that will follow a target object, such as a player. I wanted to avoid just simply using the inverse of the target's transformation, ...
0
votes
1answer
76 views

Problem with Quaternions and Unity's Euler Angle Convention

So I want to rotate an UI-Element according to my magneticHeading, I just want to apply the magnetic heading to the z rotation in EulerAngles. So I tried to do so, which brought me to some weird ...
1
vote
0answers
42 views

Rotation of a point around axis using quaternions

I have a simple processing program to rotate a point around arbitrary axis but it stops after a bit. I'm trying to get full rotation of the point around the axis. import org.apache.commons.math3....
1
vote
0answers
164 views

OpenGL ArcBall Camera

I'm currently working on a OpenGl Project and I have alot of difficulty understanding how arcball camera work. From what I have read online, all I have to do is to rotate a camera around a target and ...
-1
votes
1answer
37 views

How do I allow my player object to continue rotating once it's met a clamped boundary?

I have a spaceship I'm moving around on the screen, when the player moves the ship, it rotates on its axis. However, when the ship meets a clamped boundary(on the x-axis) it abruptly stops. How do I ...
0
votes
2answers
96 views

Unity3D - Smooth rotation for seek steering behavior

I am trying to implement Reynolds' seek steering behaviour, but I am having problems on the rotation part. This is what I have: void FixedUpdate() { // get position of current waypoint ...
0
votes
2answers
46 views

How to create a linear plateform between two points?

I have a set of 2D coordinates. Their positions are regular on the X axis, but unpredictable on the Y axis: I would like to create slim platform between each point in order tu use it as ground for ...
0
votes
0answers
46 views

3d rotation of a cube using DirectX

I can't solve an apparently simple problem: i have a cube, similar to the one in the following picture I've tried to write a small demo where i can rotate the cube by dragging the mouse, but i can'...
0
votes
1answer
76 views

Extract a rotation matrix given a camera direction (vector) and a up vector for the camera?

I am having some issues constructing a rotation matrix from a camera direction vector. The Up vector is computed from the camera direction as such: up = cross(cross(direc,(0,1,0)),direc) How do i ...
1
vote
1answer
42 views

How to compute a transformation matrix that describes each position and rotation on a sphere?

I am having an issue constructing my transformation matrices, for this sphere problem. I know the 3d coordinate of the center, and the radius of, the sphere. Since I know the radius and center ...
1
vote
1answer
46 views

Smoothing a rotation vector

I am currently using OpenCV to track the face of a person. With this I extract the feature points and calculate the objects heads pose by applying the "solvePnP" function. This function gives me a ...
0
votes
0answers
9 views

Unity 3d Js head bone rotations

There is another version of Head Look script (link here, and code below) https://xenoaisam.com/2015/04/28/unity3d-eye-focus-and-head-look/ This is a simpler open source code that works better with ...
0
votes
0answers
34 views

Camera movement on a sphere, and how to look while doing it

I am trying to make some kind of pointerlocked walking simulator that involves movement of the camera on the inside of a sphere. I've looked at Walking on a sphere, but that solution fights what I'm ...
1
vote
1answer
22 views

Wrong pivot point of parent / wrong scale of children

I'm trying to make two objects, in is an intact glass, the other one is the glass but shattered. So for the shattered glass, in Maya I make a Plane, cut it with the multi-cut tool, extrude the faces, ...
0
votes
2answers
40 views

Roatating a Game Object downward

In my game I have a rocket which is traveling horizontally across the screen. What I am trying to do is when the player runs out of fuel, the rockets engine stops (already coded) and then the rocket ...
0
votes
1answer
67 views

Libgdx Sprite rotation around specific point

I made complex dynamic body that rotates around other body that is static. It works perfectly, however I got messed up with sprite position on that body. Here's what I have now and here's what I ...
1
vote
1answer
82 views

Rotating A model in 3D so it matches its direction of movement

So I have a model of a spear and when it gets thrown I want to set the orientation of the spear to its direction. ( I also want to use this for other things like bullets pointing in the direction ...
0
votes
0answers
39 views

How to spin a 2D quad in place using only matrices?

In short, I have a textured 2D quad (a sprite). I would like to rotate/spin it about the z-axis (coming out of the screen) using nothing but matrices. If I do the following to a transform with scale ...
0
votes
1answer
35 views

Calculating a matrix to have the model follow terrain

So I've been messing around with 3D graphics in Java (using lwjgl), and I've hit a bit of a roadblock. I have a heightmap and a cube, and I want to find a way to have the cube rotate to follow the ...
0
votes
1answer
62 views

Rotate a UI Image exactly 360 degrees over the course of 1 second?

I have a UI Image that I want the user to click and have it rotate 360 degrees once on the z axis. I can get it to rotate through a coroutine but I'm having trouble making it stop once it is started. ...
0
votes
0answers
34 views

How to rotate with quaternions

I need to simply rotate around an axis, but because unity uses quaternions for calculating i have issues with converting into euler angles. When i ask for rotation of an object in euler angles it ...
0
votes
1answer
75 views

In Game Maker Studio, why does the image rotation have to be performed every step?

I'm a software developer who's trying to get into game development casually on the side. I picked up Game Maker Studio a while ago on a Steam Sale, and I'm finally getting into using it, especially ...
0
votes
2answers
91 views

Rotating hitboxes in pygame?

I'm using pygame.rect.colliderect() to check hitbox collision between sprites in my game, but now that i'm rotating the sprites, I'm realizing I can't do this because there's no way to rotate a pygame ...
0
votes
0answers
59 views

How can I find the rotation of a hinge joint?

I'm wondering if there is a way to get the rotation of a hinge joint. Not the actual transform.rotation/localRotation/Rotate etc. but like the rotation of the hinge joint component. For example what I ...
0
votes
2answers
58 views

How do I stop the player from rotating when they collide with a tile?

I use Touch movement and if I jump and hit a corner with the feet of my player, my player rotates but I don't want this. Can anyone help me jumping without rotating if I hit anything ? here is my ...
1
vote
1answer
51 views

BulletPhysics ship rotation

First of all, I'm a beginner in game physics, and I think this is a relatively easy problem that I'm not grasping. Short Version: I have a box(representing a ship on water) going forward with a ...
1
vote
1answer
132 views

How to clamp a direction vector within a direction pyramid?

In 2D you can specific an angle range such as [-45 to +45] and clamp a 2D direction vector within that angle range. I want to have something similar for 3D. I want to specify the allowed directional ...
1
vote
0answers
33 views

Translate D3DXMatrixLookAtLH to Unity compatible code

I am currently trying to port a really old Game (I have the source of it) to Unity as a fun project. And I'm currently stuck with the object rotation techniques in Unity compared to the ones used in ...
1
vote
1answer
56 views

libgdx sphere rotation after movement

I'm moving my sphere on the screen using this method: Matrix4 m = myBall.body.getCenterOfMassTransform(); Vector3 translation = new Vector3(); m.getTranslation(translation); float multiplier = delta ...
0
votes
0answers
47 views

Can you explain the following C# script for camera behavior

Here is the script, it rotates the camera left right with a target "player in this case" rotating with it. using UnityEngine; using System.Collections; public class ControllingCamera : MonoBehaviour ...
0
votes
1answer
132 views

360 degree quaternion interpolation?

I am in the process of implementing interpolation into a simple game loop I am playing with after reading the infamous "fix your timestep" article (which is amazing by the way). I have the position ...