- Home /
rigidbody.velocity or transform.position
Hi, When I use rigidbody.velocy = new Vector3(x,y,z); in a low-end (cheap) smarthphone it calculates wrongly the distances (my script stops the gameObject at a certain distance), so I thought rigidbody.transform.position may not have that error. Does it have it?
Thanks
@klarax gave the solution :) tryy using FixedUpdate function instead
What do you mean by error? transform.position ( the same as rigidbody.transform.position, gameobjects only have one transform) is a position, the most correct value you can get from an engine since otherwise the object would be where it's not (quantum mechanics :) )
I mean that when I run the game in a single core 800mHz processor smarthphone it has around 30fps and in my script an object that is moving at x velocity doesnt stop when it should (I have an if statement) this problem only happens in that smarthphone due to his low processing capacity, so I was asking that if I use transform.postion ins$$anonymous$$d of rigidbody.velocity it will have the same probem? Thanks :)
It would be nice if you would provide some code, because I need an idea what exactly you're doing.
@$$anonymous$$larax that fixed my problem, thanks!!! @hexagonius No need now, but thanks any way :)