I am actually using Player Relative Control Prefab from the Standard Assets (Mobile) Folder and i have a 3D model that have a few storey. The problem here is i am trying to move the character (Player Relative Control) Up/Down one storey upon clicking on the GUI Button of 'Up' or 'Down' respectively. But i would need to click on the 'Down' a few time before the character will actually move down by one storey. I am using the following Code:
Someone can kindly advice me on what i should do to resolve this?
Thanks in advance!
Below is a sample of my problem code which should fire of when i click on the Button:
if you want to instantly jump one floor when clicking the button, there's no reason to multiply by deltaTime. You do that when you want to move at some steady rate over time, as in an update() function, and you multiply deltaTime by the velocity, not by a target position.
Assuming newPositionX/Y/Z are the point you want to go to one floor up/down, just remove the "*Time.deltaTime" bit entirely.
answered Nov 02 '11 at 03:38 AM