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.

DarkBASIC Professional Discussion / animating 3d-object

Author
Message
Kadmium
21
Years of Service
User Offline
Joined: 21st Nov 2002
Location:
Posted: 21st Nov 2002 09:18
I can't understand next phenomenon.
I had loaded animated 3D-object. It’s first frame - _startframe. Last frame - _endframe. Here is the part of my code:
do
...
if upkey()=1
loop object _num_obj, _startframe, _endframe
move object _num_obj, _step_obj#
endif
...
sync
loop

Compiled code gives the different result by Dark Basic and by DB Pro.
By DB:
When "Arrow Up" key is pressed the object is moving with the step _step_obj# and animating from the _startframe to _endframe frames.
By DB Pro:
When "Arrow Up" key is pressed the object is moving with the step _step_obj# and remains motionless. But when the "Arrow Up" key is not pressed the object is animating from the _startframe to _endframe frames.
What's wrong?
Kadmium.
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 22nd Nov 2002 00:09
In DBPro you only need to call the loop object once, otherwise the object will start the loop over again at _startframe each cycle. In DB it doesn't call it again if the object is already looping.

Login to post a reply

Server time is: 2024-04-20 07:49:26
Your offset time is: 2024-04-20 07:49:26