As you can see on the photo my player never fall down(He has rigidbody and collider component), he only falls when i set his starting position above the architecture at the very beginning, but the he is not falling at all… also when i put him above the water he falls right on the water.
My translateLocal has delay like 2-3 seconds till it istart working, then working fine, but when i turn off collider component it works right away.(ofc i dont want to remove my collider cause i need it
@DevilZ thanks, now it is working properly, but when i use force or impulse and i release running button my player keeps moving even though im not giving more impulses or force. i tried to set linearVelocity to 0 but it didnt help.
You’ve got the idea, but I’m not sure if set is a keyword to be used here. You would want to do this.entity.rigidbody.linearVelocity = pc.Vec3.ZERO, and same for angularVelocity as well.
Thanks for that it works now i have learnt something… the last thing, while holding run button, players speed is exponentionaly growing, should i set max linear velocity while running?
So you would get the currentX and currentY values, and set linearVelocity equal to something like new pc.Vec3 (currentX, currentY, whatever value of Z).
Ah, the screenshot has loaded now. What you are doing is trying to call the LinearVelocity as a function, which won’t work. In my previous post, I had said equate it to the new pc.Vec3, which means you use the equals to sign to assign the vector.
EDIT - I can’t see you declare and/or set the currentX and currentY values anywhere?
edit: maybe not wrong with the code but i should be still getting impulses even when in the air, because once he is falling you cant move forward anymore
edit2: fixed, probably.
Issue 2: if you try to go on a platforms you can see that its like invisible collider in the center and you actually cant get on the other side to the finish