Linked Questions
37 questions linked to/from Why use Time.deltaTime in Lerping functions?
0
votes
0
answers
34
views
9
votes
2
answers
16k
views
Best way to interpolate player movements in a very fast paced Unity game?
In my Unity online multiplayer game players move very fast and I currently use Lerp to interpolate between their last position and current position:
...
3
votes
2
answers
10k
views
How To Smoothly Animate From One Camera Position To Another
The Question is basically self explanatory. I have a scene with many cameras and I'd like to smoothly switch from one to another. I am not looking for a cross fade effect but more to a camera moving ...
2
votes
2
answers
7k
views
3
votes
3
answers
1k
views
Finding average input value over time in seconds
I'd like to find the average input value from a controller over the last n seconds (say the last 0.1 seconds) and do this every frame.
I can see how to do this for the past n frames by storing a list ...
0
votes
1
answer
2k
views
Frame-rate independant movement with acceleration
First of all, this is different to this question, because that question doesn't update entities the same way I am.
My update loop goes something like this (for the player):
Apply acceleration based ...
1
vote
2
answers
2k
views
How can I make a shader that will make a cube or any object invisible?
I'm trying to create a shader that will make the object invisible and then with a script a fade in/out effect between invisible and visible.
What I tried:
...
0
votes
1
answer
2k
views
Starting a Coroutine after another Coroutine ends
I have a method that fades the screen to black, then fades away back again using coroutines but I couldn't get the 2nd part to work.
FadeToBlack() works if I put <...
1
vote
1
answer
2k
views
Add Lerp on only the Y axis
I want my camera to be smooth on only the Y axis.How do I do that it?
Current code:
...
0
votes
1
answer
2k
views
How to rotate CharacterController on slope
I'm trying to rotate my characterController player on a slope on the 'x' and 'z' axises, however things aren't going so well.
The player does rotate, but if I move and look in another direction, the ...
0
votes
2
answers
810
views
Moving panel between two positions smoothly?
I'm trying to make my panel moving from one position to another one smoothly. What I get is more faster no matter what I did to make it slower never get slow !! Both Vector3.Lerp and Vector3....
0
votes
2
answers
1k
views
Unity 2d - Vector3.Lerp Not Working as Expected
I have asked this question on other community but still get no response after a month, so I decided to ask it here.
I am trying to put player position to the middle of camera when it is reaching near ...
0
votes
1
answer
2k
views
How to set transform.up without locking the y-axis?
I'm trying to make an object's transform.up to a normal of the raycastHit point. I tried using this line of code:
...
0
votes
1
answer
1k
views
Lerp performance for camera movement
In my current script responsible for camera movement, I use Mathf.Lerp to smoothly move the camera to the desired position (with WASD movement, panning with MMB, ...
0
votes
2
answers
2k
views
Syncing & smoothing movement with rigidbodies with Socket.io
I am building a 2D top-down MMO that's very lightweight.
I have a master client that determines everything's position and actions, and sends this information to all other clients.
Now I have made a ...
0
votes
1
answer
1k
views
How to convert linear lerp to non-linear using animation curve?
I have some code I run when I fell a tree in my game. Basically it picks a random direction and then falls. However atm it linear and doesnt look very realistic. What Id want is for it to start slow, ...
1
vote
1
answer
1k
views
how to get if a rotation/position has been completed?
I've done an if / else with the final position / rotation plus they never complete, how can I check this?
stays like this
https://i.sstatic.net/3ADqz.gif
...
0
votes
3
answers
948
views
Lerp rotation is offset
I am trying to get an object to slowly look at another object, that is, rotate slowly so its forward points towards the target position. Here is my code:
...
0
votes
1
answer
948
views
Rotating a spaceship around 2 axes rotates it around 3
I am developing a 3D space shooter and I've found that when trying to rotate the ship using X and Y axes, it also rotates on the Z axis.
The answer here helped me a lot, but now when I try to rotate ...
0
votes
1
answer
889
views
Can't figure out what's making the player teleport back to spawn
I've been working on a multiplayer game that uses pathfinding and I'm really confused over this one weird bug. On your screen, the other player glitches between the spawn point and his current ...
0
votes
1
answer
600
views
Why the transform is not looking at the target?
The goal is to make smooth rotating look at.
The parent object is my character have a Rigidbody.
The script is attached to the character parent.
I make a reference to the character child name head.
I ...
0
votes
1
answer
476
views
0
votes
3
answers
386
views
Using Lerp to zoom in on an object inside an if statement
I'm trying to zoom in on an object once the raycast hits it in the Update method, I am using the Lerp method to make the camera movement smoother but it's not working properly. The object only lerps ...
0
votes
1
answer
527
views
Smooth Rotate Object While Orbiting
I am working on a 3D game where you can control an object that orbits a sphere with an on-screen virtual joystick. So far I have that part working, but the object follows the joystick angle perfectly ...
0
votes
1
answer
408
views
0
votes
2
answers
364
views
Java LERP but with whole pixel values
I have a formula which returns a Lerp Vector3 value in integers but the problem is it never reaches the desired target value. It'...
-1
votes
2
answers
431
views
Parent object does not rotate on its own axis with its children. How do I fix it?
My parent object components: Rigidbody2D and the script I shared below.
Children(Head, Body, Arm, Backpack...): There is only collider. There is no rigidbody2D. (I want the parent object to use the ...
0
votes
1
answer
245
views
Move between two points at a constant speed in LWJGL
I've been making a game engine in lwjgl and I have been trying to get an ai to move from one point to another. I used a lerp method but the speed is dependent on the distance between the two points, ...
1
vote
1
answer
387
views
Camera Sensitivity in PointerLockControls to match actual games
I am creating a FPS game online. I want the user to be able to use a sensitivity they are familiar with from games they've played. In this case, I want them to use their Fortnite sensitivity.
I am ...
0
votes
1
answer
473
views
Does CharacterController benefit from adding lerp?
Does CharacterController benefit from adding lerp?
as in this script.
...