-1
votes
1answer
107 views

lerp z rotation towards mousepointer

I am trying to get transform.rotation.z to chase the mouse pointer at a rotation speed. But I get a very weird results and can't figure out what I am doing wrong. var mp = Input.mousePosition; ...
-2
votes
1answer
129 views

Lerp speed or lerp time [closed]

Am I right about the fact that lerping can be done over a set period of time or at a speed which will continue until the target is reached? How are the formulas for the two? Is it something like ...
-1
votes
1answer
65 views

Lerping back and forth in Coroutine [closed]

Im trying to lerp the scale of a game objecto to 30% its size and then back again, but all i get as output is " Blippping Cursor up scale 0 down scale 0 IEnumerator Blip_cr ...
0
votes
6answers
546 views

Quaternion Lerp never reaches target

I seem to have misunderstood something about how LERP works. Im not sure what is missing. The object is rotating as it should, but it cant seem to get it to end. The transform.rotation dont seem to ...
2
votes
1answer
445 views

How do I make an object face the mouse position, but only on one plane?

I want a game object to turn and look towards where the mouse was clicked (in world space). It works well when considering all 3 dimensions, but I really only care for the plane formed by the x and z ...
1
vote
1answer
144 views

Spot Light color fade in Unity 3d

I have a scene where many spot lights are focused on the screen. All have red color and same intensity. What I want is that the red Color(0,0,0,1) value should increase and decrease in a fading effect ...
3
votes
1answer
501 views

How to smoothly change the target of smooth follow without camera glitch?

I am trying to change the target of the smooth follow at runtime, but there is a glitch in the camera since the targets are different sizes. I tried using lerp and smooth damp both gave the same ...
0
votes
3answers
478 views

Lerp problem object teleporting not moving

Hi i just wanna move my object smoothly from one position to another but object disappear and immediately teleport to position where i clicking anyone know whats happen ? if ...
1
vote
1answer
396 views

“lerp” returning value (Shader)?

I don't understand the lerp example in this code : if(dot(WorldNormalVector(IN, o.Normal), _SnowDirection.xyz)>=lerp(1,-1,_Snow)) o.Albedo = _SnowColor.rgb; else ...
0
votes
1answer
170 views

Lerp an object based on timers

I'm trying to make a target lerp between two objects based on a timer. At the moment, I have the following code: float distCovered = (Time.time - waitTime) * speed; float fracJourney = ...