Smooth movement in vb.net Help me

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
DGENXP
Posts: 124
Joined: Tue Dec 27, 2005 2:49 am
Contact:

Smooth movement in vb.net Help me

Post by DGENXP »

I am wondering if it is possible to make the movement smoother as i am finding that when i set the key to make the model rotate or move it is either smooth and slow or fast and noticebly jurky is there a command or code listing to make it smooth and fast

eg. 3d Gamestudio code C Script eg (I know im using VB but this is just an example)

my.posx=x + 20 *time;

this will make the character move not just on the key pressed but also on the clock time of your processor

I would simply like to know if this can be done on irrlicht.net (VB) using obviously a different code in irrlicht

Your help would be much appreciated on this matter

P.s sorry for such a long post
gagagu
Posts: 8
Joined: Wed Jul 13, 2005 1:32 pm

reply

Post by gagagu »

Hi,
i do not know it exaclty but i've read for a long time in a book that you should not use the time factor for movement. You should use the framerate to calculate this.
You mus calculate in this way that the player ist moving in same speed by 10 fps and by 120 fps.

Hope this helps you ?
noone

Post by noone »

Of course u can use the 'timefactor' or the 'fps-rate' (which is a time factor)...

DGENXP i don't exaclty now where your problem is? Maybe you first learn some VB.NET ?

Here is some 'pseudo-code'

Code: Select all


Dim LastTime as Time 

Do

Character.Position = Character.Position + Direction * (NOW - LastTime)
LastTime = NOW

Loop

Locked