Questions tagged [rotation]

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

Filter by
Sorted by
Tagged with
1
vote
3answers
251 views

How to make TEXT RENDER stand facing the camera of my character and also for the camera of simulation?

I have an actor (Minion) with a Text Render just above it mesh: As you have seen, I defined your rotation as absolute, so the text does not rotate along with the actor. In the game the rotation ...
1
vote
1answer
237 views

how to clamp the look at function?

how can i look at a target on 2 axis but clamp the the object's rotation ,to only rotate from -45 to 45 on x and from -60 to 60 on y axis. i used this script to look at target and clamp the rotation, ...
0
votes
0answers
21 views

How to implement Meshlab's rotation manipulator? [duplicate]

I want to implement a rotation handle/manipulator mechanism that would enable user to rotate a 3D model exactly like Meshlab does. Unfortunately I don't fully understand how does the rotation gizmo ...
0
votes
1answer
44 views

Quaternion rotation around center, undefined behavior

Here's my code: ...
0
votes
0answers
43 views

The X axis becomes the Y axis after a quaternion rotation

I am making a FPS game, and I have a for loop where I place out "ground" objects. (pseudo code) ...
0
votes
1answer
143 views

Rigidbody character rotation

How could I rotate my character that I'm using a rigidbody to move. I tried using transform.eulerAngles and changing those but the camera feels very jittery.
0
votes
0answers
32 views

Rotation Freakout using Constraiend Rigidbody and VRTK_FixedJointGrabAttach

YouTube Video Demonstrating Error Constraining the ridigbody along certain axes. Used with VRTK: FixedJointGrab. Tried both precision grab and normal. Only freaks out when 1-2 rotation axes are ...
0
votes
1answer
63 views

Applying Y offset to rotation / position script

I'm using the script stated below to move a spray bottle around a head. The code works fine: I have assigned the script to the spray bottle, and I have set the head as the target. However, I was ...
0
votes
1answer
55 views

Adding -90 degree Y rotation into script

I'm using the following script to move a spray bottle around a head. It should looke like in a barber shop. The code works fine: I have assigned the script to the spray bottle, and I have set the ...
0
votes
0answers
70 views

Quaternion Rotation after performing previous rotations

Have Quaternion \$ Q\$ which is rotated on the \$X\$ axis 90 degrees. \$Q\$ is now \$ (0.707106, 0.707106, 0, 0)\$. I want to rotate \$Q\$ another ...
0
votes
1answer
35 views

Does CharacterController benefit from adding lerp?

Does CharacterController benefit from adding lerp? as in this script. ...
0
votes
0answers
18 views

Unity MainCamera won't rotate

I'm making a player-script/FPS in unity where you walk around with WASD and rotate the camera with mouse x/y axis. The "character"/"Player" should be able to rotate with the mouse X axis. (E.g If you ...
2
votes
1answer
41 views

How do I calculate vehicle rotation when two car wheels are on the ground to simulate gravity?

I'm writing some code to simulate a vehicle (tank or car) driving over a heightmap terrain. I'm not using a full physics engine, and just simply checking the height of the terrain at the 4 bottom ...
0
votes
0answers
9 views

Issues with Flashlight Handle position with player rotation

I want the flashlight to look same while looking up and down as when looking straight. Normal Position for Hand and flashlight: Looking up and down, position is completely off: More images for ...
0
votes
0answers
24 views

Unity: How do I fix the players model rotation in a NetworkManager to spawn properly?

How do I fix the players model rotation in a NetworkManager to spawn properly? I created a game with the NetworkManager code. Player Model is a cone I made and imported. all works fine but when the ...
0
votes
2answers
47 views

How to detect whether a transform has rotated left or right

I have a game object in my scene, and I want to know how can I calculate whether this game object rotating to the right or to the left. For example : ...
0
votes
0answers
63 views

Joystick Orientation Wrong After Camera Rotation

I am using a virtual joystick to move & rotate the player and a touch swipe system for the camera rotation, The problem is that when I rotate the camera (Let's say I rotated the camera to 45 ...
0
votes
1answer
70 views

How to rotate two textures at once in Libgdx, while keeping their relative positions the same?

I am trying to develop a game with cards, where the user can swipe left or right to tilt the cards like this. The red & white cross should stay in the same position on the yellow card as they tilt ...
0
votes
1answer
45 views

Character rotation according to camera causes rapid flipping when game starts

When I load my scene, my character rotates +90 and -90 on the X axis very fast about 4 or 5 times, and then he stops at -90 on X axis (lays back down). When I move the character, the rotations are ...
0
votes
0answers
200 views

How to rotate after a rotation in Godot / GdScript?

This 3D mesh is rotated by 45 degrees on the Y-axis. The camera follows the same rotation, resulting in these images Now I want to make the mesh rotating parallel to the camera. That is, if the ...
0
votes
1answer
36 views

Rotating objects in an random rotation around center point

I almost have what I'm looking for. Still trying to understand rotation and spawning of objects. I have a ground field with a number of spawn points (and they are placed randomly in a circle). It's ...
0
votes
2answers
51 views

Rotating on a slanted surface?

I want to rotate (change it's yaw) an object when its sitting on slanted ground. Pretty much I want to rotate around the ground's normal. Right now I ray cast down, get the ground's normal. Then I do:...
1
vote
3answers
222 views

How to accurately capture the direction in which the mouse moves?

I used to play this game on Kongregate called Death vs Monstars. A tl;dp (too long; didn't play) explanation of the mechanics is that the character you control follows your mouse cursor. Your ...
0
votes
1answer
134 views

Quaternion.LookRotation with Joystick

I am having an issue i cannot seem to figure out within my code. What this code does at the moment is that it rotates the 3D Model around the z axis but i need it to rotate around the y axis. Any help ...
0
votes
2answers
52 views

How to calculate turret position after rotation

I'm trying to make a tank character for my game but I couldn't do the math of firing bullets from turret instead of center of the tank. I tried some Stack Overflow solutions but I couldn't understand ...
1
vote
1answer
126 views

How can I rotate my character so that he is facing the mouse?

I just want to preface this by saying I am very new to pygame. At the moment I have calculated the angle that I need to apply to my character so he can rotate but I am unsure how to actually make ...
2
votes
2answers
72 views

Rotate on one axis, but visibly keep the other axes stable and editable

It's been a long two weeks. Quaternions are freaking complicated. I've managed to make a few baby steps towards finishing my project, but I've hit a brick wall and could use a few of your beautiful ...
0
votes
1answer
32 views

How to calculate/structure/define rotation vector for OpenGL / WebGL

I am trying to define the buffer data for WebGL and want to have in there something that encodes the fact that an object might be rotating. So it makes me think of angular momentum. So if you have ...
0
votes
1answer
80 views

How do i make enemy tank to follow and face player tank?

I'm creating tank game demo , in game i want enemy tank to always face toward the player tank. I already check look_at() function but it will face immediately, i don't want that. I want enemy tank to ...
0
votes
1answer
37 views

Z rotation matrix inverting object

I'm currently creating a 3d game where I need to rotate shapes. To do se, I created a rotation matrix for each axis, X, Y and Z. X and Y are giving me expected results, but not Z who kind of "inverts ...
0
votes
1answer
153 views

Rotate an object smoothly by using Accelerometer Input in Unity

There is a simple script where the object orientation is equal to the mobile devices orientation. it works but the object doesn't rotate smoothly. ...
0
votes
1answer
16 views

Issue with script recognizing particular z-axis rotation angles in Unity

I'm trying to make a simple flowing pipe-style rotation puzzle, but having issues getting Unity to properly recognize certain angles of rotation. My rotation script for the pieces: ...
0
votes
1answer
389 views

How to rotate CharacterController on slope

I'm trying to rotate my characterController player on a slope on the 'x' and 'z' axises, however things aren't going so well. The player does rotate, but if I move and look in another direction, the ...
0
votes
1answer
149 views

Handedness of 2D coordinate systems

I know that there's always a big debate on the handedness of 3D coordinate systems, but I can't seem to find any information about the handedness of 2D coordinate systems. Usually, the X axis points ...
0
votes
1answer
397 views

Unity3D: Replicating SM64 turning movement into Unity

Brief Summary: I want to recreate Super Mario 64 turning movement into unity without the clunky movement I currently have. And I would also love how to implement the camera rotation system mentioned ...
0
votes
1answer
129 views

how to get if a rotation/position has been completed?

I've done an if / else with the final position / rotation plus they never complete, how can I check this? stays like this https://i.imgur.com/3cQ9AEk.gif ...
0
votes
3answers
116 views

In 2D, how can I improve character rotation using raycasts when dealing with sharp/convex edges?

Edit: After making some edits to my polygon collider (based on @Alex F's suggestion), I can indeed confirm that sharp, convex corners are causing the buggy ...
0
votes
0answers
34 views

How to convert a rotation around an axis into pitch and yaw rotation

So i want to rotate particles towards a point and i've already figured out how to calculate the angle and the rotation axis. Currently what i do is simply use a 3 dimensional matrix, apply the ...
0
votes
0answers
21 views

how do I instantiate something with only the y axis rotation matching the instanciators y rotation

i'm making a swimming mechanic for my game and i need to instantiate the swim camera under neath the fps player when it hist the water. no mater what I try the swim cam wont have the same y rotation ...
0
votes
1answer
59 views

how do I move an object based on rotation of another object?

This question is related to my other question about camera rotation. I hope its acceptable to ask a second question. I cannot figure out the math of how to calculate moving the camera to stay behind ...
3
votes
1answer
133 views

Why does my collider rotate correctly on a slope only when a ray is cast directly from its center?

Edit: This answer might also be helpful to those who come across this question. I've been messing around with raycast collisions and slopes, but am having an issue when trying to get my collider to ...
0
votes
2answers
157 views

RigidBody.MoveRotation Resetting to (0,0,0);

I'm trying to rotate a character on along the y axis but rather than continuing to rotate, it rotates then the y rotation goes back to 0. I'm not sure what I'm doing wrong. The same thing happens if I ...
0
votes
0answers
98 views

Need Root Motion For Gravity, But It Affects Rotation?

I have a little animated character in my game with multiple animations. In order to have gravity affect him, I turned on "Apply Root Motion" in his animator. Now one of his animations won't rotate ...
0
votes
1answer
45 views

Move a point to another, along an elipse

according to this picture, I want to move my yellow object, smoothly to the red one. And I want to have an eliptic trajectory in relation to my center point. So for now I'm having this code: ...
-1
votes
1answer
67 views

Rotation Problem in Mario galaxy like controller [duplicate]

i'm doing a Mario galaxy like CCC. And I have a serious rotation problem, may be Gimble lock, or maybe not. So first, I have a parent object ("PLAYER") who can rotate toward a planet: https://youtu....
0
votes
1answer
355 views

Unity smooth local rotation around one Axis, oriented toward a target

I want to acheive the same rotation you see in the inspector. In short: a smooth local Y rotation, toward a target I have a Vector3 orientation: ...
0
votes
1answer
98 views

Unity - Calculating a rotation based on game time

I have a simple script to make an object spin: Spin Speed is the speed to rotate the object on each axis (preferably in degrees per second). Local is whether the rotation should be done based on ...
0
votes
1answer
335 views

Order of rotation in Euler angles

I'm want to control the direction my camera looks, so I'm using Euler angles, so rotating around an axis is relative to rotation around previous axis. Something like this. I want to always rotate ...
0
votes
1answer
51 views

2D Rotation of an object along a curve line

I would like to rotate an object along a curve. I managed to move the object along the curve using bezier curve algorithm. The hard part is to rotate the object constantly(no limit on maximum angle), ...
0
votes
1answer
136 views

Can't rotate object after using transform.forward

I'm using above code to rotate object pointing where it moves: transform.forward = m_Rigidbody.velocity; It works fine, however the problem is that I can't ...