#Rigidbody Movement Interpolation
1 messages · Page 1 of 1 (latest)
Can you screenshot how the scene looks? @analog hatch
Alt + Print Screen only captures the active window.
do you mean this?
include the hierarchy
ah
that one is kinda complicated currently
but here is it
worldobject are not attached any scripts
What type of game is it?
Do you need very precise movement?
i want to make game like nimble quest
the head must move precisely to make the followers move correctly
Alright. Saw the steam video just now.
Will you be needing real-life like physics simulations, like making objects collide with players or players with enemies?
That's the strength of the physics system, but not all games need it.
Movement is achieved by either adding forces or manipulating the rigidbody.velocity directly
yes, that game has same collider that player be hit by enemies' projectiles
and is the collision visually simulated? ie. does it influence the movement of the character because of the physics properties (not direct coding)
yes, at least currently
How does that work when you move when being collided with?
or does that ever happen to the player? (ah, yes, you said so earlier)
private Vector2 tempPos;
private void FixedUpdate()
{
MoveDirection(currentDirection);
Debug.Log(Vector2.Distance(tempPos, transform.position));
tempPos = transform.position;
}
public void MoveDirection(string direction)
{
if (direction == "Left")
{
rb.velocity = new Vector2(-1 * speed, 0);
}
else if (direction == "Right")
{
rb.velocity = new Vector2(1 * speed, 0);
}
else if (direction == "Up")
{
rb.velocity = new Vector2(0, 1 * speed);
}
else
{
rb.velocity = new Vector2(0, -1 * speed);
}
}
in this code you set the velocity
which means you will override physics simulations
Does this currently behave as you want?
it depends
usually my collider set as Is Trigger = true, so most collsion is just handled by scripts
it think if i can move it correctly, not important how it is moved
i use rb.velocity because its simple for my current brain 
The entire reason I'm asking all these questions, is because you seem to care at some level how it is actually moved, because you care about minute differences in distance travelled.
Do you already have followers, and are they in or out of sync?
yes, they are sync alr
wierdly, i used same method but they are sync, player doesn't
So there's nothing obvious going wrong, you are mostly worried about the difference in the numbers?
yeah, but that cause the movement not smooth
So technically they are not completely in sync?
Do you have an example I can compare to Nimble Quest?
hmm, lemme record if i can
I was waiting for a response, but it seems you've been engaged in other conversations. That's bad practice. Good luck.
sorry, my disk is out of space at the moment and I have to work right now
Rigidbody Movement Interpolation