Quantcast
Browsing all 133 articles
Browse latest View live

Stage selection problem

Hi everyone! Here's my problem now. I am writing a script for a game. Now I'm at doing the part where there'a stage selection on choosing which part of the game you would like to go. The stage...

View Article


Quaternion Slerp 180 Away from target

I am working on a space flight simulator, at this point i'm trying to get an autopilot running to approach and stop at a defined distance to the target object. I don't want the possibility to simply...

View Article


Loop Logic - Update() and Quarternion.Slerp

Hopefully it's obvious what the problem is in the code. Can't quite figure out how to get around it. The object rotates how I want but only a incrementally because the loop then waits for...

View Article

No more collision while Quaternion.Slerp

Hi, I got this object with rigidbody (no gravity) and a capsule collider matched to the objects dimensions (no trigger). The following script is attached to it: This is in the Update() function counter...

View Article

How do you check if Quaternion.Slerp has finished

This is my first question here. I'm a beginner programmer, just been thrown into it at work. Im actually just a 3D modeller, but anyway. I've got a situation where I have set up a camera with a look at...

View Article


quaternion and interpolation: no reaction?

Hi, I would like to rotate a cube towards a cylinder, but Quaternion.Slerp does not work, the cube does not rotate at all. Would you know why? The following code is attached to another object (not...

View Article

how to turn the moving object using arrow keys?

Hi , I created simple practice game of moving player. I finished that part. Next, I just want to move the player based on keyboard arrow keys. i.e: <- = To turn left side and move -> = To turn...

View Article

Quaternion.Slerp timescale behavior

I've got a coroutine that I'm calling to rotate and object so that it faces another direction using Quaternion.Slerp. It doesn't seem to be rotating correctly however: public IEnumerator...

View Article


Cant get Quaternion.Slerp to work.

My script is almost 200 lines long, so I'll just post the rotation function. Essentially what happens is that after the ship has moved a few units, it'll stop rotating properly and basically get locked...

View Article


Vector3.Slerp bumping problem

Hello, I made a script to add a more realistic movement on my flashlight. it works well, but it's not smooth enough. Here's a video I uploaded to show you the problem. [video][1] Notice how the...

View Article

Range of Detection?

Hey guys, I'm very new to Unity so I don't know what I would use to do this, but I would like to have an enemy rotate towards a player if it is within a certain radius. I've already managed to use some...

View Article

Using Quaternion.Slerp() to rotate an NPC.

I'm having some issues with Quaternion.Slerp. I'm trying to simply rotate the NPC to where there player is standing when they are being talked to. Here's what I have for my starting dialogue function....

View Article

How do I make an object face forward while it is orbiting another object?

I have a simple enemy in my game which orbits the player if it comes within a certain distance of them, the enemy orbits correctly and everything else carries on correctly. But I cannot figure out how...

View Article


How to make quaternion.slerp stop snapping

So I have this code to rotate a ship so it faces the player in a 2D game (all in Z plane): Quaternion desiredQuaternion = Quaternion.LookRotation(-desiredVector, -Vector3.forward);...

View Article

Quaternion.Slerp still rotating object instantly (rather than over a number...

Hi - I'm struggling to get my camera to return to 0,0,0 over a number of seconds, as at the moment it transforms instantly. Does anyone know what bit I'm doing wrong? var mouseIcon : GameObject; var...

View Article


Rotating gameObject to aim at target using Quaternion

![alt text][1] As shown in the above image, I have a Scene where a player and an enemy face each other with a goal to hurt one another using the gun. Here's what actually happens in the scene: Player...

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
Browsing all 133 articles
Browse latest View live


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