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 / Object Animation problem

Author
Message
Justice
20
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 20th Nov 2014 14:41
Hi,

I have recently came back to programing in darkbasicpro after quite a long break.

I have a simple program which loads a 3d world and I move around in it using the mouse.

I have placed an object (in this case the zombie .x object in my 3d world)
The problem I have is that for some reason I cant get the object to loop its animation, its always still.
I cant remember having this problem in the past, am I missing something ?

Hope someone can help me

Attachments

Login to view attachments
Hotline
16
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 20th Nov 2014 14:53
Hm... my first thought is you call

loop object 50

inside the main loop.So each frame you start the animation from the beginning... ergo your character is freezed at the first frame
put loop object 50 outside the main loop



[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]
Justice
20
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 20th Nov 2014 15:29
ok I did that, but no change

Attachments

Login to view attachments
Justice
20
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 20th Nov 2014 17:55
Anyone got any other ideas ?

Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 20th Nov 2014 18:51
Pretty basic example but it works here
cheers

Attachments

Login to view attachments
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Nov 2014 19:49
Quote: "Anyone got any other ideas ?"


I can't see anything obviously wrong with your code - but then I can't test it. Have you tried changing the object's speed? Perhaps it is moving but very slowly?

In a situation like this I would write a very basic test program which simply loads the model and loops it at a sensible speed. Then slowly add your other stuff till you can see what's causing the problem if necessary.



Powered by Free Banners
Justice
20
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 20th Nov 2014 19:59
Thx

I like your program and it works well.

I copied the animation part into my program.

when I press "u" my character moves 1 step then stops

not sure what's going on.

Attachments

Login to view attachments
Justice
20
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 20th Nov 2014 20:38
Problem solved.

I changed the fastsync command to sync and everything is fine.

Thank you to everyone who tried to help me.

Login to post a reply

Server time is: 2025-05-14 07:30:38
Your offset time is: 2025-05-14 07:30:38