Quantcast
Channel: Questions in topic: "interpolate"
Browsing all 93 articles
Browse latest View live
↧

How to lerp with a changing "from" value?

It's possible I'm not even using this right but basically I'm making a hunger system and I'm calling this in fixed update: public void Starve() { if(CurrentHunger > 0) { CurrentHunger =...

View Article


Get a value that interpolates between two floats based on where character is...

I'm making a controller script for a paper airplane and I'm currently stuck on trying to make the plane gain speed when facing down but lose speed when facing up. The ideal way would be having a...

View Article


How to fix stuttering of balls falling under gravity force.

I used Rigidbody2D, with gravity scale equal to 0.1, and Interpolate is set as `Interpolate`. The rest of setting you can see on the right-hand side one the video posted below:...

View Article

Rigidbody2D interpolation doesn't work properly

Hi, I'm using Unity 2017.1.0f3. I have a simple object with Rigidbody2D on it, the rigidbody has settings like on the picture below ![rigidobody2D][1] When I move the object by changing rigidbody's...

View Article

How to interpolate or polyfit two data sets?

I have a speed and angle of a boat. Like "speed = (0,5,8,14)" and "angle = (0,3,5,4)" What is the angle at speed 3? In matlab this is just one command ... And ofcourse I need an fast algorithm. I found...

View Article


Player starts moving in one direction nonstop after colliding with any other...

My current issue is that when my player capsule collides with any other object that has a collider it starts to move nonstop in the opposite direction of the collision. **Player Components:** ![alt...

View Article

Mathf.Lerp for integers

Unexpectedly for myself, I'm hung up on this issue. Suppose there is an array with a length of N elements. And we need to take an element from there, but not by index, but by value t = [0..1] *(from 0...

View Article

Linear Interpolation of Array Values

Hey all, Im currently working on a car physics simulation and I am implementing the torque curve (in Nm)/RPM of an MX5. So I created an Array with a step for every 1000RPM so from : 0 RPM to 7000 RPM :...

View Article


Child Object Rotation interpolation problem,

Hi everyone, I have a turret made of 2 parts: -the "Base" that can only rotate left/right; -the "Body" that can only rotate up/down and is a child object of "Base"; ----------------- Both objects have...

View Article


How do I make my gameobject rotate smoothly towards target?

I have a transform which is the player's head bone, and I want to rotate it towards the opponent smoothly. Right now, with the following code, the player's head rotates towards the opponent as...

View Article

Stuck with weapon recoil

I just can't figure out how to make a recoil script that doesnt get back to old rotation.

View Article

How to change Rigidbody interpolate through script.

I need to switch Rigidbody interpolate to none when a function runs, And I don't know the syntax of it. Help

View Article

how to change Rigidbody "interpolate to none" through script.

Hello, I want to change Rigidbody interpolate "interpolate to none" through script when a function runs, But I don't know the syntax of it. Help

View Article

Browsing all 93 articles
Browse latest View live


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