- Home /
transform position and dotween
Good day, have a problem with transform position in dotween sequence
Sequence dash = DOTween.Sequence()
.AppendCallback(() => damageable.isInvulnerable = true)
.AppendCallback(() => SetWeaponHitbox(3))
.Insert(0, transform.DOMove(transform.position + (transform.forward * 7), .35f))
.AppendCallback(() => dashParticle.Stop())
.Insert(0, skinnedMesh.material.DOFloat(1, "FresnelAmount", .2f))
.Append(skinnedMesh.material.DOFloat(0, "FresnelAmount", .5f))
.AppendCallback(() => SetWeaponHitbox(0.45f))
.AppendCallback(() => damageable.isInvulnerable = false);
in 4th stroke i change the position of character, it can stuck in object, someone know how to fix this?
It seems as if you are manually setting the position of your object, which would, in a sense, 'teleport' it to whatever end position it needs to go to. This would cause it to get stuck in objects.
I recommend that you either add physics to your object, and use physics-based movement, or check if the end position is inside of the bounding box of a collider or object, in which case, move a few steps back/forward. @razdvatri4
Your answer
Follow this Question
Related Questions
leantween ltspline control points setup 0 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
DoTween - how to add ease type? 1 Answer
Making The Hole In A Golf Game 1 Answer