Quantcast
Channel: Questions in topic: "rotating"
Browsing latest articles
Browse All 173 View Live

Get only -180 to 180 value

hello! i'm looking for a way to get back only the value from -180 to 180 on my rotate object, because up -180 it will go to -181 and so on... thank's you in advance

View Article



How can I rotate an object without moving it up or down?

This is my code there, i have an aircraft, it has a rigidbody component with no gravity(i have some constraints) the movement is good but when i try to rotate it left or right, it's rotating and...

View Article

Rotating a direction vector

I am trying to make a portal component for my game, that will get the velocity of the object passing through and the angle of the portal that it is going to and the one it is passing and calculate the...

View Article

Gamepad and Keyboard camera rotate

I use a script that rotates the camera around the player using Mouse X and Mouse Y Input. But I have two characters, and I want one camera to rotate with the mouse, and the other with the joystick or...

View Article

Jump perpendicular/adjacent to current point on a rotating circle

Hello! So I have a box that becomes a child of a rotating circle on collide and I am adding a fixed joint to the point of collision so that the box will seem to be rotating on the surface of the circle...

View Article


How to make something rotate faster and faster

I have an orb in my game and it rotates 25 degrees per second from a script but I want to make so it can attack and I want it to go faster and faster after every second so it "charges" itself how would...

View Article

Transform.rotate gives different result to rotation in inspector

If I have a character in my 2D game that has its rotation set in the inspector like so: ![alt text][1] If I do this as soon as my scene loads before moving my character: Debug.Log(transform.rotation);...

View Article

How to Select objects and move and rotate them on the x,y,z axis.

Hi, I was wondering how I could move objects on the x,y,z axis in my game. Like when you select a object a 3 arrows will appear to show t x,y,z axis same with rotation it but only with rings around it....

View Article


managing rotation of Turret on two axis

Hi. i'm a beginner developer. My question is how would I go about doing this? i'v found an script on internet and modified for my purpose. ___ i have a cube(player) with a rectangular cube child(gun)....

View Article


how to stop the player from shaking? 3d endless runner

am working on a endless runner 3d game and the player seems to shake !! so I notes the problem is that in the rotate the player to where is he going, but I cant figure it out where exactly the mistake...

View Article

Rotate turret faster if hull is rotating the same way

Hello, What i want is pretty easy, I have a tank, so a turret and a hull. Both rotate perfectly fine. But the turret's rotation speed is not calculated depending on the hull's rotation speed. Another...

View Article

How can I get my 2D enemy to rotate to look at my player?

This is the code i have so far Vector3 dir = player.position - transform.position; Quaternion lookRotation = Quaternion.LookRotation(dir); Vector3 rotation = lookRotation.eulerAngles; enemy.rotation =...

View Article

Flipping the position of the gun when rotating player

So I have a roguelike player that can look in 4 directions and I have the gun flippiing when it hits 90 degrees and vice versa, but I want the gun to flip to the other side of the player as if it is...

View Article


Moving a rotating gameObject along its current angle using mouse (Unity2D)

Hi all, I'm trying to work on a part of my game where an object revolves around another object, depending on where my mouse is. I got that part working 100 percent, but now I've run into a problem with...

View Article

How to increase and decrease rotating speed

I have speed data like 10 m/s, 6 m/s, 15 m/s, 20 m/s. I want to rotating speed increase by 10 m/s after time speed 6 m/s something like that variable speed. I already wrote rotating speed script code...

View Article


Rotating a grid,

Hey guys, I made a base building game where you place your buildings on a grid. Now I created an AI that also builds a base and I want it to face the player with it's base. I can't just rotate the...

View Article

how to rotate the player in 3d mobile game

hello guys i am new in game dev and my problem is i dont no how to rotate the camera in one click like you click one click and after the click the player rotate 90 dgree in the y

View Article


Rotate within range

Hi everyone, I'm making a multiplayer 2D CirclePong game in Unity and have ran into an issue involving the racket. ---------- I want the paddle/racket to only be able to in rotate in its area (top or...

View Article

how to jump Perpendicular to the rotating platform

Hello , first of all i wanted to apologize for my bad English. i have a simple jumping game . in this game there are rotating platforms , and a game object , whenever the player clicks mouse the game...

View Article

IK for hands

Hi.I have a question about IK solution. So I have a aim idle animation(just a guy pointing a rifle) and I made a simple IK system to look at the cube. The chest and spine,head are looking at the target...

View Article

Rotating Game Object in Movement Direction on planet with Faux Gravity Unity 3D

Hi all, I am modeling a bicycle traveling around the globe in 3D space. (see video of what I'm doing here: https://youtu.be/XAKR_LDCCho). The problem is that I cannot figure out how to rotate the...

View Article


ROTATION STOPS when i move the char on the air!

Ok, i got 3 types of jump (normal, **spin** and **fast spin**). The spin works well **when second and third jump is on**, but... if i press "move Input" **(A or S key)** the spin stops! if the key is...

View Article


How to reset child object's rotation without changing parent's

Hello Unity Community! Okay, so I have kind of a noob question here: This is what I need to accomplish: In my platformer game, I have portal objects that lead you to the next level, but I don't want...

View Article

How to reduce alt-drag sensitivity?

Hi, You know how we navigate/rotate in the scene by holding alt and moving with the mouse, right? How do I reduce how fast it rotates (like, the sensitivity or something)? Is there a way to do this?...

View Article

The Rotate tool doesn't work.

I am working on the floor is lava challenge in unity essentials. I am trying to use to rotate tool, but it does not work. Here are some pictures. Before: ![alt text][1] After adding 60 to the Y...

View Article


Coroutine not starting from Update

hello, I wrote a script around me that will return to it when a character appears in a random place, but the problem was that if I run this function on the button, it works, but if I write it in the...

View Article

How to "clamp" a y rotation in unity?

Hello! I am currently creating a game in Unity. In it, I have a player and a camera, controlled by the mouse, that freely rotates around the player, independent of the player's rotation. I want to...

View Article

How to rotate gun only on X and Y axis?

I have a game where the player is stationary and enemies walk at them. I have a gun in front of the player view that moves left and right / up and down with input from the mouse. However, The Z...

View Article

2D Gun rotation code

Hi, I am working on a 2D platformer/shooter. You jump around a parkour and shoot enemies at the same time. Currently I am working on a mechanic so that the gun rotates toward the mouse. For this...

View Article



Object Rotates back and forth instead of rotating only one direction

[See Video][1] I want my object to rotate 90 degrees on X axis when I click it. I found one script [here][2] but it doesn't work for me as expected: 1) The object doesn't rotate 90 degrees but about 89...

View Article
Browsing latest articles
Browse All 173 View Live


Latest Images