Quantcast
Browsing all 133 articles
Browse latest View live

Limiting rotation in 2 axis'

I have spent many many hours working on something unsuccessfully and am just shy of given up, I wrote out this question once already and my sleeping girlfriend decided to roll over my mouse and somehow...

View Article


How to Rotate Y axis of an Object toward virtual joystick direction

Hi I'm creating a third-person game which uses virtual analog/joystick. I have a player and i want it rotate toward the virtual joystick direction. I'm a beginner and i don't know so far about this....

View Article


how to rotate bullet towards target direction?unity2D

i've problem to rotate bullet towards in enemydirection in unity 2D.is there another way to do this instead of lookrotation?(i think this works only in unity 3D , because for rotating in unity2d we...

View Article

Head rotation is working on editor but not android phone

Hello everyone, I have a humanoid character and I am using Slerp to make its head rotate toward a certain point. To override the animations that I am using I added this part in LateUpdate. Everything...

View Article

Quaternion Slerp/Lerp doesn't work

Hi, I want to create smooth rotation of flashlight movement in the wrist. Everything works fine now, but I cannot get smooth rotation from original angles to new angles by using slerp or lerp...

View Article


How to make character rotate in the direction of movement and direction of...

[Here][1] is an example of what I am trying to accomplish that I found when trying to find a solution I am attempting to make a third person character controller with 8 direction movement where the...

View Article

Quaternion.Slerp rotating immediately not over time

I am trying to create a camera system akin to the DSi/3DS version of Persona or Demon Gaze for the PS Vita. The problem is when I rotate the camera, it snaps to the end rotation immediately rather than...

View Article

Problem with gameObjects rotation when reaching target

Hi, I'm having a problem with getting my game character to rotate towards its target. Whenever it detects its target it always rotates to the same angle instead of rotating to face the target no matter...

View Article


why does the quaternion slerp occur instantly?

void OnTriggerEnter (Collider other) { if (other.tag == "swordrange") { rb.angularVelocity = new Vector3 (0f, 0f, 0f); while (Quaternion.Angle(transform.rotation,qt)>.1f) { transform.rotation =...

View Article


Rotation with respect to world instead of the object itself using Quaternion...

> this.transform.rotation = Quaternion.Lerp(this.transform.rotation, Quaternion.Euler(xtimesHit*90,ytimesHit*90,ztimesHit*90), Time.deltaTime*speed); The above code is rotating my object w.r.t...

View Article

Help with translating and rotating a camera

I've built a simple 3D scene and put some 2D sprites in the scene. I have a camera that overlooks all 8 sprites. There are 4 close to the camera and 4 far away in the distance. I'm trying to...

View Article

How to rotate smoothly

Hey, I started Unity a week ago and until now some search here help me but now I'm kinda stuck. The thing is, I want to rotate an arm smoothly with the mouse Y coordinate so I try to use...

View Article

A problem with Quaternion.Slerp

I have a spaceship with a Rigidbody which can be controlled by the user. Inside FixedUpdate I modify x and z rotation to turn it upright while the user still controls the spaceship. It's a kind of an...

View Article


How to rotate an object using quaternion.slerp locally with restriction?

I want to have an enemy that rotates around y-axis at random value, with a restriction at how much angle it can rotate locally. I tried various methods and simple transform.rotatearound worked....

View Article

How to rotate an object around itself relative to the camera using Slerp?

I'm making a game and in this game I need to rotate a planted using the mouse left button, so I used this code: `public int speed;` `public int lerpSpeed;` `private float rotationX;` `private float...

View Article


Getting a smooth rotation with Quaterminions slerp in IEnumerator

I'm trying to get an AI character to follow me around and I'm having some trouble getting him to face the object he is chasing. Here's my code. IEnumerator UpdatePath() { float refreshRate = .25f;...

View Article

Transform rotation and position on key input: rotation only working the first...

Hi, I want to rotate and move a game object to a set position and rotation. The transform.position is working fine, but the rotation only works the first time I press the q and w key, but after that it...

View Article


Object rotate and slowly stop to toward

Hello. I want to rotate object by z axis. Here is my code. [SerializeField] GameObject obj = default(GameObject); float _lotationSpeed = 50f; float _stopAngleZ = default(float); // determine stop angle...

View Article

How to Quaternion Slerp back to Original Position but Keep Current Heading?

Hi guys, I'm using this code: transform.rotation = Quaternion.Slerp(transform.rotation, originalRotationValue, Time.time * rotationResetSpeed); which works great. However, originalRotationValue returns...

View Article

Use curve effect on rotation?

Hey all, I have a game where an object of mine with a rigidbody rotates into the ideal position for the direction it's facing. Here is the code: float my_Aerodynamic = 0.2f; my_Rigidbody.rotation =...

View Article
Browsing all 133 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>