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

learn more… | top users | synonyms

2
votes
0answers
37 views

Increment grid by rotation

I'm currently working on a grid for snapping objects side by side. My current script is working fine, but only for game objects which haven't been rotated. Here is an example video of the problem: ...
0
votes
0answers
18 views

How can I restrict rotation about the intersection point to right angle intervals?

Right now, I can draw two line segments and then rotate about the intersection point using one of the line endpoints or by dragging the whole line about the intersection point. I can scale my line by ...
0
votes
1answer
36 views

Free camera rotation in 3D space

I'm using a view matrix to do camera movement and rotation. viewMatrix = new Matrix4f(); viewMatrix.setIdentity(); Matrix4f.rotate((float) Math.toRadians(rx), new Vector3f(1,0,0), viewMatrix, ...
0
votes
0answers
25 views

LibGDX make an object rotate around something

I need to rotate and object, which should be a circle made up with a ShaderRender, around a specified point. In LibGDX there is a method or something which allow me to do this? If it doesn't exist how ...
2
votes
2answers
64 views

How do I calculate rotational impulses in rigid body collisions?

I'm writing a simple 2D physics engine to help me understand the inner workings of physics engines. I'm following Randy Gaul's tutorial which can be found here and It's been extremely useful and ...
2
votes
1answer
63 views

In XNA, how do I access a model's dimensions with code?

I'm trying to rotate a model around some axes, but this rotates it around the world origin. I understand that I need to translate the object relative to its own size before rotating it, but I don't ...
1
vote
1answer
71 views

unity3d - Instantiate and fire bullet realtive to player rotation in 3D

This is a top-down view but in 3D coordinates, I would like to instantiate and fire a bullet from the player's gun. This script is on a spawner object at the end of the barrel. Also tried putting the ...
1
vote
1answer
64 views

Turn the front wheels of a car according to the car's bezier path

I have a 3D car which follows a predefined 3D Bezier path. I want the car's front wheels' rotation to match the car's changing direction. I had the idea to match the wheel's orientation to the ...
0
votes
2answers
44 views

Position child on the edge of the parent circle while scaling unity3d

I have come across to some different situation. I have one circle sprite and i am rotating circle continuously while rotating i want to make circle smaller and larger. I have one object on the edge ...
0
votes
1answer
52 views

How do I rotate a cube around an axis, relative to the camera view?

I want to be able to rotate a cube, either by dragging vertically to rotate it around the Y-axis, or dragging horizontally to rotate it around the X-axis. However, when the camera is rotated 90 ...
0
votes
1answer
79 views

Unity forward vector flips when upside down. Mario Galaxy style gravity, bad rotation?

This is a question that I think is best to explain visually, so I will do my best to be succinct here. What I am trying to do: Allow the player to run about a world that is spherical, not a flat ...
0
votes
1answer
63 views

Calculate 3D “up” vector to align ship to an arbitrary axis

I'm writing a script to control the movement of a 3D ship in a game. Given the ship's position and the coordinates of the destination, I've successfully calculated the Yaw and Pitch necessary to aim ...
0
votes
0answers
27 views

Rotate the camera on a given angle

Good day! I apologize in advance for my bad english. The task is as follows: "On the stage there is a camera and a gun with rays when a ray gun out of sight of the camera (vertical) is required to ...
2
votes
2answers
96 views

How do I rotate and object around itself, and translate it at the same time?

I have this animated gif of my problem. I have a sprite object with a box collider, and I'm trying to rotate it around its center. My rotation script consists of this : this.transform.Rotate (0, 0, ...
0
votes
1answer
51 views

How to create a smooth rotation with a constant angle?

I am trying to make a game where the player can only rotate to 4 angles. Something like this I cannot use Quaternion.Rotatetowards because the player's position is not constant, but I don't have the ...
0
votes
1answer
66 views

How to modify the Unity sprite renderer (or create a custom one) that can display the sprites on the X-Z plane?

Prefix: I am NOT trying to rotate a sprite 90 degrees by it's transform, this changes what is up/down and forward/backwards for the object. I need the sprite displayed on the X-Z plane in comparison ...
1
vote
1answer
61 views

Determine which face of a cube is facing the camera

I have a Cube with a unique color for each face. I made a script where I can swipe and rotate the Cube in increments of 90 degrees in each direction. what's the best way to determine which face of a ...
0
votes
2answers
63 views

Problems with Rotation Matrices on Certain Axes

Here is what my rotation matrix looks like: public Matrix4f initRotation(float x, float y, float z) { Matrix4f rx = new Matrix4f(); Matrix4f ry = new Matrix4f(); Matrix4f rz = new ...
1
vote
1answer
56 views

Why is rotation not applied instantly?

I am working though the Space Shoot tutorial and I have just applied tilt to the player object. One of the things that I have noticed is that the tilt is not applied instantly but instead the player ...
2
votes
2answers
82 views

How do I keep my orbiting camera upright?

I am working on code that rotates the camera around a point on the in-game map when dragging the mouse. I understand how to lock it so it stays above the map surface. However, if I keep rotating the ...
0
votes
1answer
143 views

Rotate Object Towards Direction in 2D

For my RTS game's physics engine, I'm trying to find out a clever way to make a unit face the direction it's moving in. Given a Vector2d direction of movement (its normalized velocity), how can I ...
0
votes
2answers
96 views

How to rotate (YAW) aircraft in XNA?

I'm developing a flight simulator based on Riemer's Blog tutorial (XNA C#). To control the aircraft, I use the following code: Quaternion additionalRotation = Quaternion.Identity; additionalRotation ...
5
votes
1answer
133 views

What direction is forward when the rotation is (0, 0, 0)?

I'm representing the rotations of my actors (or gameobjects) with euler angles (one float for each axis). And I've always considered the vector (1,0,0) (x,y,z) to be the actor's direction if all ...
0
votes
0answers
54 views

Java Slick2D rotating a Shape using transform(Transform.createRotateTransform())

I have spent most of the day trying to debug this tiny piece of code, and I can't for the life of me figure it out. I'm making a pong game for the Mini Ludum Dare currently going on. I am programming ...
0
votes
2answers
144 views

How to stop rotation every 90 degrees?

I was facing another rotation problem yesterday, that i managed to solve by rotating the object like this : transform.Rotate (speed * Time.deltaTime, 0, 0, Space.World); I tried almost every other ...
0
votes
1answer
44 views

How can I rotate a Transform over a specified time in a single line of code? [duplicate]

How can I rotate a Transform over a specified time in a single line of code? I have had a lot of trouble with this in the past. I wrote a script which rotates a Transform by a specified rotation ...
0
votes
0answers
21 views

Bike rotation freeze rotation

Hello im making a bike game and need it to stay up (doing a wheelie) without gravity knocking it down ive tryed freezing the rotations and turning off gravity and it dosent work, so not sure how to do ...
0
votes
0answers
17 views

2D smooth Rotation Unexpected

I am trying to get a smooth 2D rotation and this semi works but only in (-x, +y) I have tried using a lerp but I still get the same result. So I believe, it has something to do with the rot_z value ...
0
votes
2answers
41 views

Combining two independent rotations relative to the world frame

I am implementing a mouse rotation which works by accumulating the X-Y delta between frames to yaw and pitch rotation angles. The problem is that I wish rotations to be independent of each other. But ...
1
vote
0answers
90 views

How do I implement realistic recovery from weapon recoil?

I want to create an equation determining how fast a gun recovers back to its center after it has fired. I have a weapon system functioning based on constants (recoil amount, bullet spread, etc.) ...
0
votes
3answers
93 views

How to rotate a gameobject to the specific angle

I have tree model that is being rotating .After certain angle it should stop rotating.I have done a sample code.But the tree is not stopping. void Update () { //transform.Rotate ...
5
votes
2answers
274 views

How does glRotate affect the axes of the global coordinate system?

I am currently playing around with 3D transformations applied on a 2D context in LWJGL, to later be implemented in my game. So I managed to set up LWJGL well enough (scaling, translating, scaling and ...
0
votes
1answer
38 views

Matrix Rotation Only Works On one Axis At A Time

I have this function in my vertex shader. It makes a transformation matix out of a transformation matrix, a rotation and an intensity. It works just fine when setting the rotation of one of the axis ...
11
votes
3answers
363 views

Rotate object around fixed axis

I am trying to let the user of my app rotate a 3D object drawn in the center of the screen by dragging their finger on screen. A horizontal movement on screen means rotation around a fixed Y axis, and ...
0
votes
2answers
67 views

Gradual rotation of an object in Java

I'm using Java to learn some movement algorithm. I would like to implement the "wandering" algorithm, but in order to do it, i should understand how to rotate an Object gradually. Actually, my Player ...
0
votes
0answers
15 views

How can I track a leader vehicle at a specific angle and distance?

I am using Matlab and have code which allows a vehicle to find its way to certain coordinates chosen by the user. I now want to add a second vehicle which stays fixed at a specific distance and angle ...
0
votes
2answers
108 views

Vector3.Angle() Never Reaching 0

I'm having trouble understanding why with this script, Vector3.Angle() sometimes will never reach 0. This question comes from me trying to make a "turret" that rotates to face a target position. It ...
0
votes
0answers
61 views

Pre- or post-multiplication for rotation between coordinate frames

I have three 3D coordinate frames: O, A and B, as shown below. I want to know the rotation matrix RAB between A and B, that is the rotation that is required, with respect to the frame A, to move ...
0
votes
0answers
29 views

Rotating between two coordinate frames

I have two coordinate frames, A and B. I want to create the rotation matrix RAB which takes you from A to B. A is a right-handed system, and B is a left-handed system. Furthermore, after moving from a ...
0
votes
1answer
69 views

Rotate a plane defined by its normal and its distance

First apologies for the amount of pictures, it's a bit hard trying to explain my problem without pictures. Hope I've provided all the relevant code. If you feel you want to know about how I am doing ...
1
vote
0answers
52 views

Unintended twisting of geometry while generating a mesh?

I am creating a real time animation of tori (toruses), and I've run into a problem where at certain angles of my tori, the geometry is twisting up where it should remain straight. Here is an animated ...
-1
votes
2answers
139 views

Accelerometer bike game rotation help

Hi I've been making a game for the last few months and not sure what to do. It's a 2d bike game and I want the rotation done with accelerometer, at the moment To test on computer I've set the ...
0
votes
0answers
30 views

Quaternion Slerp Over Time Help

I've gathered some code from several places and the final result almost works correctly. However, at times there is noticeable "snapping" from one place in the rotation towards the finish or too ...
0
votes
1answer
55 views

Fps independent rotation [duplicate]

I'm trying in my game to have camera rotation speed idependent of fps. For keyboard it works without problems but not for mouse movoment. At 60 fps it works good but at 200 for example rotation is to ...
0
votes
0answers
41 views

Motion Blur (as per GPU gems article) only considers camera rotation, not translation

I am following this article and have implemented it exactly as described: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html The problem is that things are only blurred when the camera is ...
0
votes
2answers
91 views

Rotating an object with quaternion

I have a question in regards to using quaternions for the rotation of my graphics object. I have a Transform class which has the following constructor with default parameters: Transform(const ...
2
votes
1answer
145 views

Project rotated matrix to isometric coordinate

I have a group of soldiers, and each has a vector describing their position in the squad. When the group rotates, I do this math to calculate the desired position of each soldier. var unitPositions : ...
0
votes
1answer
66 views

Affine transformation: rotate a plane parallel to another plane

I am writing a function that extrudes a 2D shape along a 3D spline, as found in 3D modeling software. I need a way of translating a set of points P so that they all lie in a new plane L (preserving ...
1
vote
0answers
47 views

Is there a way to rotate an Ellipse in libGDX for collision detection purposes?

I'm trying to avoid having multiple overlapping Circles for a UFO-shaped sprite. Two Ellipse objects will perfectly cover the shape of my UFO, but I want to tilt/rotate the UFO when flying left and ...
2
votes
2answers
109 views

Translating an object in the rotation direction

I am creating a graphical scene with OpenGL and SDL, and I'm running into a problem in regards to translating an object in its rotation direction. Each of the graphical objects in the scene has a ...