All Questions
466
questions
1
vote
1
answer
21
views
I am having a hard time getting an object to rotate and move in the object's new forward direction
Why is my player still moving forward(north) in world coordinates? I want the player to face and move in a new direction. Please explain in simple terms.
void PlayerMover()
{
_step = _speed * ...
1
vote
1
answer
43
views
Getting Smooth Response between Horizontal Snapping
I currently implemented so that my Character leans in the direction he is walking on Horizontal Layer. So if he presses 'D' he leans to the right and 'A' he leans to the left.
I got that working, but: ...
0
votes
0
answers
22
views
"UV pixel mapping" a projection onto a planet
My problem is that i try to "UV map" an unwrapped jupiter onto points on a sphere and i did that but the texture doesnt rotate (just occasionaly flips 180, to be exact i see the poles of the ...
0
votes
0
answers
17
views
Unity, Camera movement Tilt
Trying to add a camera tilt while moving. Found this code in forums posted by "bididon0" yet in my particular case, I assume, it only works partially. As long as I do not rotate my player ...
1
vote
1
answer
39
views
Alter object’s transform so its parent’s matches its child’s
Going insane over this. I’m trying to figure out a way so that when I grab an object, I can set the rotation & position of that object such that the rotation and position of the original object’s ...
-1
votes
1
answer
37
views
Quaterion capitalization difference
I was writing some unity 2d Quatarion Rotation code, but after completing, it gave some errors, then, i capitalized 2 Q's in 2 "quaternion" keywords, and the code started working Just fine. ...
0
votes
0
answers
60
views
Upper and lower body rotation issue in Unity
I've got a problem related to rotation that's driving me crazy.
I'm pretty new in the 3D world and I'm playing with character movement. The goal is to:
Have the upper body face the player's looking ...
0
votes
2
answers
39
views
I am working an a player script for a 1st person game, can anyone help me add clamping to this rotation script?
cameraVertical = Input.GetAxis("Camera Vertical") * turnSpeed * Time.deltaTime;
myCamera.transform.localRotation *= Quaternion.Euler(cameraVertical, 0, 0);
I am working in unity, and I am ...
0
votes
0
answers
67
views
How does Unity implement its RotateAround function to avoid jitter?
I have a GameObject that I am rotating around a given point in 2D using my own implementation which is the following:
public override IEnumerator transformPlayer(MyTransform target, GameObject ...
0
votes
0
answers
21
views
Slerp Parent to face camera with child facing up
I'm trying to get my Parent to rotate itself so that the selected child will face my camera.
I have tried the script below, but it doesn't have the desired effect.
IEnumerator lerpR(Transform child)
{...
0
votes
1
answer
94
views
Getting a specific portion of rotation in Unity
I'm trying to implement gear physics using Unity, but I've encountered an issue. I've written the following code for one gear to follow another gear.
Quaternion targetRot = Quaternion.Inverse(...
1
vote
1
answer
199
views
Camera gets inverted when turning 180 degrees vertically in Unity
When I am turning my camera 180 degrees vertically the horizontal input gets inverted
using UnityEngine;
public class FreeLookCamera : MonoBehaviour
{
public float sensitivity = 2.0f;
...
0
votes
1
answer
45
views
Unity, specific rotation
I have this object that I want to rotate but I want to Clamp the possible rotation to lets say 10 degrees. For example, the rotation around Z happens while the player has the A key pressed down, comes ...
0
votes
0
answers
246
views
Unity | How Can I Rotate Multiple Objects In a Constant Matter Without Using Parent Objects?
I'm attempting to rotate a tunnel, which is segmented into 6 panels, around a player object located in the center of the screen. I'm doing this by rotating each panel individually by the same amount. ...
0
votes
2
answers
220
views
In Unity2d, Does not `transform.right = Vector2.left` means 180 degree clockwise rotation?
I'm using the transform.right property to rotate my GameObject, because modifying a Basis vector is as rotating a object (suppose basisX = (0,-1), basisY = (1,0), v = (1,2), then the linear ...