Questions tagged [rotate]
The rotate tag has no summary.
44 questions
0
votes
0
answers
49
views
How to rotate the "top" sky texture with Directx9?
I'm working on designing and animating the sky with a cubemap. The surfaces except for the "TOP" move in a way that follows each other. However, I could never figure out how to adapt the &...
0
votes
1
answer
102
views
LibGdx sprite isn't rotating correctly around its own axis
I'm currently trying to rotate a sprite around its own axis to make it "face" the mouse, but I'm having weird results. This is my code:
...
0
votes
1
answer
85
views
Rotate and Zoom a group of tiles
I'm working on a tile-based game and I'm trying to rotate my tiles as a group around the center of the screen and want to have the ability to zoom in and out. Here my code:
...
0
votes
0
answers
35
views
I am looking for a flexible way to rotate a gameobject around another
I try to make an object rotate around another object on mouse input. In order to achieve this I used this code:
...
0
votes
1
answer
118
views
How do you make Cube not instantly rotate upon Keypress in opposite direction?
I have this movement script on a Rigidbody cube with X,Y,Z Rotation Constraints.
It is working well to move and to rotate in the direction of the movement.
However, ...
-1
votes
1
answer
66
views
Rotating an object around a rotating object
Im trying to build a model for the solar system in OpenGl, and I got the planets to move around the sun, but can't get the satellites to move around their planet. I can't share my code since this an ...
0
votes
1
answer
214
views
What is the difference between the two circles in the rotation tool in Unity?
What is the difference between the two circles in the rotation tool in Unity?
In 2D rotation tool there are two circles which allow to rotate an object. And I can not conceive a difference between ...
0
votes
1
answer
554
views
OpenGL/C++ Rotate relative to shooting gun
I'm trying to make a 2D game where I have a gun that i use to shot things in the direction of the mouse resulting in an angle that I can get. I have some problems with the trajectory of the bullet ...
0
votes
1
answer
965
views
How do I calculate the x,y of the rectangle after rotating?
I'm using SDL2. I want to draw a textured rectangle and I'd like it rotated so I'm using SDL_RenderCopyEx. However SDL2 doesn't give me the option of repeating texture so I need to manually do it ...
6
votes
3
answers
3k
views
Rotation grid positions
I'm dealing with objects on 15x15 chunks in my game.
I'd like the chunks to rotate, for example, rotation version 0 is the original position of 2,5;
(EDIT: Oops, rotation 2 and 3 names need switching ...
2
votes
1
answer
212
views
Transform.Rotate is jumping around
Why is the parent that contains 4 children jumping around and then settling into a position instead of rotating once by 90 deg? I can't seem to get it to rotate a single time as expected.
...
1
vote
1
answer
89
views
Rotate Sprite in direction it is moving while beeing dragged
I am working on a 2D topdown game where you have cars you can drag around. you can touch any given car and move it around.
This kind of works but when I drag a curve the sprit of the car does not turn ...
3
votes
3
answers
616
views
How do I rotate a sphere so that a position on it comes to a specific location?
Sorry for my english. I added a picture to explain what i want.
I want rotate Big Sphere to make the black point locate in front of camera. (to the white point's position)
not black point moving, ...
0
votes
1
answer
91
views
After rotated by Z-axis, X/Y axis still rotating just like z is 0
I'm making aerial vehicle controller, which can rotate 3 axis: X(Pitch), Y(Yaw), Z(Roll).
Rotating x(pitch) and y(yaw) axis works fine, however after I rotated z(Roll) axis, x/y rotation gave me ...
-1
votes
1
answer
1k
views
How to rotate a point around a pivot by changing the axis
I've been stuck on this forever now because I don't understand math in the slightest and when people talk about matrices they just give the table and don't explain how to actually go through each step....
-1
votes
1
answer
107
views
how do i clamp my camera's rotation on X and Y?
i'm using a script to make my camera rotate smoothly toward the mouse cursor on the screen. and the only thing i need is to somehow clamp it's rotation on X and Y. here :
...
0
votes
1
answer
174
views
smooth look at only on x and y
i'm using the script down below to make my camera look at mouse x and y position, and it has a limitation for my camera rotation.the problem is the way my camera rotates is not smooth at all.is there ...
0
votes
1
answer
215
views
Lowering Unity launcher graphic quality settings reduces mouse x turn speed, does quality affect time?
Lowering Unity App quality settings reduces mouse x turn speed, how to fix this?
I am not sure why this happens my only thought was time.timedelta is affected by the graphics quality setting in unity ...
0
votes
0
answers
76
views
Rotate a Vector by Quaternions
I'm trying how to work out how to Rotate a Vertex using Quaternions, using a scientific calculator, or on paper. Exam preparation.
My lecturer has given us this;
Quaternion = (-0.5, 0, -0.7071067, 0....
0
votes
3
answers
7k
views
Stopping the texture2D from stretching in RawImage
I am working with a RawImage texture which is fully stretched, filling up the entire scene. I am using some code to download images from website and then show them on the RawImage, the code is simple, ...
0
votes
1
answer
57
views
Rotate player to vector3 point?
I want my player object rotate to face vector3 point on terrain.
...
0
votes
1
answer
711
views
Rotating Weapon Towards mouse.position
OK guys i have tried lots of things and researched but cannot find a solution please someone give me hope.. So on my phone when i am playing i want to shoot with a screen button in the canvas that is ...
0
votes
2
answers
1k
views
How to rotate object just like in the scene?
Look at this image, I selected an object and pivot is set to local:
When I rotated selected object in the scene by X axis, it rotates exactly I wanted.
But if I rotate axis from inspector or script, ...
1
vote
0
answers
2k
views
How to make an object which position is not on the world origin rotate around the world orgin in threejs?
I've loaded an object and set its position on vector(5,2,-5) by threejs. And I wanted it to rotate around the origin point in the world coodinate system. I found a method in class Object3D called '...
0
votes
1
answer
167
views
How do you rotate RigidBody2D along a given access using velocity and not transform?
I am trying to rotate my player along the centre of the world in Unity3D.
All the tutorials and references I have looked through till now have left me to this working code:
...
4
votes
2
answers
2k
views
How can I rotate the camera around the player on the Y axis on this code in Unity?
I have a problem, I want my camera to rotate along the Y axis while he is looking at the player with an offset. I want to rotate with Q and E key to right and left around the player but on my Camera ...
0
votes
2
answers
1k
views
Rotate camera around point of view
I'm trying to rotate the camera around the view point of the camera. So when the user looks at a build the camera rotate around that building. But the camera does not need to have the building to ...
1
vote
0
answers
509
views
Limit rotation angles for Quaternion
I have a short snippet that's rotating the meshes of the wheels as I'm driving forward, but it's also rotating wheels to match the direction I'm turning, and I wish to turn this off completely.
...
0
votes
3
answers
1k
views
Limit rotation to certain angles for transform.rotate
I'm working on a small project to learn Blender and Unity, and one issue I recently came across is that while I can have the turret of my tank rotate on the z-axis based on mouse movements, I can't ...
0
votes
1
answer
875
views
Unity Controller to Make Reticle Orbit based on the right stick input
d platformer arena like game. Right now I have it so a reticle moves around the player based on a controller's right stick's horizontal movement using the rotate around function and while it works ...
0
votes
1
answer
133
views
Player Controller not working with rotation?
I have created a player character controller. It rotates first time good but not after rotate to its original position before rotation. I am sharing code with you so any one can help me, How can I ...
0
votes
2
answers
435
views
Move around object
I have problem with Unity - 2D objects. I want to rotate object around circle and on click translate it (with same angle) outside the circle to another and still rotate.
Rotating is working with ...
1
vote
1
answer
1k
views
why the camera won't rotate around my object?
im new to unity scripting, and now am building upon "Roll a Ball" example in unity training. I wanted to make the camera rotate around the ball in the scene in Y axis, when mouse is moved, and watched ...
-1
votes
1
answer
512
views
[opengl]get world position after rotate object by pivot
I need to rotate an object around a pivot,so I use this theory:
Translate the object to Pivot position
Rotate the object
Translate back the object from Pivot position
everything works fine,I can ...
0
votes
1
answer
222
views
how to naturally rotate a ball according to its velocity on a surface, a wall
I develop a game on cocos2d-x cpp. There is a ball sprite in my game. I move the ball on a surface(wall) via touch events but it can't naturally rotate according to its velocity.
if i use ballSprite->...
4
votes
2
answers
4k
views
How to properly rotate towards a local point (a local LookAt)?
I am having a nightmare trying to make a child object rotate towards a given point of its parent object, similar to what is possible at the world level when using LookAt.
The problem is that most ...
1
vote
0
answers
66
views
Can I "Pre-rotate" VBOs while loading them in LWJGL?
It is possible to flip VBOs horizontally and vertically by swapping around destination coordinates.
Is it possible to rotate an image by any angle, such as 45 degrees, using different destination ...
-1
votes
1
answer
128
views
Right-side weapon rotate to face the mouse target
I have a 3D game looking from top to bottom where I move the mouse to aim at targets.
I have a simple box (the player) with a sphere on its middle-front (that is the pistol) and a cylinder on its ...
-2
votes
1
answer
1k
views
how to rotate a sphere around centre (x y z) [duplicate]
I have centre of sphere at x y z. now I want to rotate any point (a b c) on the sphere about centre. how can I do it in c++.
1
vote
2
answers
443
views
Rotating a swinging sword in LWJGL gives wierd results
I'm making a 2d top down game in Java using LWJGL(OpenGL, essentially). I recently tried adding a swinging sword mechanism. My coordinate system is set to the bottom left FOR ALL objects. The rotation ...
2
votes
2
answers
1k
views
Making a cube slowly rotate 180 degress one time on a mouseclick
I am new to C# and new to Unity. I made a script that can turn a cube slowly one time after a mouse click but I feel like its probably wrong for using FixedUpdate. Is this OK or is there a better way? ...
3
votes
2
answers
866
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
1
answer
1k
views
Rotating an image in Python
So I am making an "Asteroids" like game and I can principally get my sprites image to rotate but when I do, the image gets kinda torn apart. This is the method I am using for rotation. Any help would ...
5
votes
1
answer
3k
views
Unity Android Orientation Bug in Auto Rotate
I am currently looking for a workaround, or fix, for a Unity bug.
I want to be able to auto-rotate my game, while respecting the Android system settings.
Currently, if you set your Unity Orientation ...