Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Smooth step 3D movement

Author
Message
rik72
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location:
Posted: 15th Jul 2004 03:43
Hi I'm new to DarkBasic Pro and need a little help with 3D movement.
Is there a simple and easy way to move an object say like on a chess board so the object always move a set number of steps always ending up in the middle of the next square.

Rik
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 15th Jul 2004 05:13
Hi...

In my game of hexapawn on a 2D chess board I took the source location and the destintaion, computed the difference between the two, then computed a fixed "step value" for each frame of animation to take place. In my case for example, a pawn would move from X=96, Y=132 I think it was to X=127, Y=150 in 30 fixed steps, so the step values were y=(127-96)/30 and x=(150-132)/30. The same process can be applied to 3D, so long as the number of steps is large enough to create a smooth motion.
S.

Any truly great code should be indisguishable from magic.

Login to post a reply

Server time is: 2024-09-22 16:39:43
Your offset time is: 2024-09-22 16:39:43