Skip to main content

Questions tagged [lerp]

Short for "linear interpolation".

Filter by
Sorted by
Tagged with
0 votes
1 answer
71 views

Lerping Time.timeScale causes laggy physics

I am using unity as my game development platform. I was trying to create script that could interpolate time scale to achieve a flurry rush. The code below is my attempt: ...
pockspocky's user avatar
0 votes
0 answers
53 views

What are some methods of adding smooth, frame indpendent, camera recoil/punch?

I've run into a bit of a brick wall on this topic. I've only been able to achieve either only frame independent recoil, or smooth recoil. But not the other. I think the main source of the problem is ...
Pen's user avatar
  • 13
0 votes
1 answer
178 views

Lerp() issues: cannot convert argument from int to float

I am using Godot 4.3, it is giving me this error and when I change 0 to 0.0, the character stops moving. If I change the last parameter to an integer also it still shoots an error: ...
zikorachimnefe fredrick's user avatar
1 vote
1 answer
453 views

Godot Velocity: Invalid type in utility function "lerp", cannot convert arg 2 from Vector2 to float on line 40

I'm trying to solve a lerp problem on my velocity, searched some stuff here and there, but found nothing that solved it. Can you help me? ...
Murilo Melo's user avatar
0 votes
1 answer
238 views

How do tween librarys in Unity update tweens?

I am trying create a small lerp helper script that basically allows me to do something like a small tween with a extension or static method (So I can call it from my other scripts easily like you can ...
Ivan's user avatar
  • 369
0 votes
1 answer
2k views

Invalid type in utility function 'lerp'. Cannot convert argument 2 from float to Nil

Here's a declaration of Vector2 camera_input. And, it comes out to be invalid. I'm using Godot 4.0.1. Code: ...
Tyler Chen's user avatar
2 votes
1 answer
507 views

Consistently moving a GameObject from Point A to Point B using Unity Visual Scripting

I built a subGraph in Unity Visual Scripting to move a GameObject ("returnThisGameObject") from its current location (Point A) to its originalPosition (Point B). The code run dozen of times ...
kanamekun's user avatar
  • 379
1 vote
2 answers
267 views

How to create a camera that combines both forced movement and smooth player following

Context So I'm making a clone of Crossy Roads where the camera follows the player. It does some linear interpolation (Lerp) after moving, and the camera starts moving away from the player in the ...
Zeid Tisnes's user avatar
-1 votes
2 answers
835 views

Lerp Teleporting In Unity

I am trying to make a object move back and fourth but its teleporting instead of moving smoothly. This is my code. ...
JJVS's user avatar
  • 1
0 votes
1 answer
681 views

Deceleration via Lerping

I have written some code that creates a very nice uniform angular acceleration for an object moving around a circle. It effectively uses linear interpolation but ramps the interpolant such that the ...
Cato's user avatar
  • 103
0 votes
1 answer
598 views

How can I ease in and out of a Lerp motion over a set duration?

Here is the code I am using: ...
Daniel Lip's user avatar
  • 1,785
0 votes
0 answers
365 views

Blending / Lerping between textures in a Unity CG Shader

I can lerp between colors just fine, but lerping between textures just doesn't seem to work. What am I doing wrong? Here's my code: ...
newShaderBIZ's user avatar
0 votes
0 answers
218 views

Why does Lerp not reach target if setting rb.position, but setting rb.transform.position works?

I don't understand the logic here. I have the following script which makes a player jump towards a target: ...
yunum's user avatar
  • 69
0 votes
1 answer
461 views

2D side-scroller game : smooth noise transition between biomes

I'm creating a little terraria-like 2D side-scroller game with TypeScript. Currently, I divide parts of the world into biomes, which each have their own properties (flat, mountainous terrain, etc.). I ...
Ekkaia's user avatar
  • 3
0 votes
1 answer
1k views

Snapping to z or x rotation values with Quaternion.Lerp

My player is a cube. I want to restrict/prevent its rotation around global y axis. I am doing this using Quaternior.Lerp since I do not want to completely constraint rotation around y axis, I just ...
Liisjak's user avatar

15 30 50 per page
1
2 3 4 5 6