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 / [DBP] Animation Only gives 2 Frames and yrotation won't work when switched to first person

Author
Message
Dreamon Star
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: The Frozen Wasteland
Posted: 13th Apr 2007 05:51
Hey, I have a 3D object which i created and animated, for the walking sequence, it'll only show 2 of the 13 frames. And for crouching, it'll just show the second of the 2 frames. This is my code, i tried many different ways, including using variables in it... Is there something i'm missing? Here's the code i have.

1)



I also Tried this instead, (move 2 is just the crouching)



If anyone can help, it'll be greatly appreciated, if needed i can send over my model... it's .x

2) I also have a big issue with trying to get the camera to yrotate, without rotating my object when in 1st person... code again is...



Thanx a lot in advance...

www.soundclick.com/octoberscry ---> My Doom Metal Band
Dreamon Star
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: The Frozen Wasteland
Posted: 15th Apr 2007 05:09
can no one help? I've seen similar posts when searching, but still have the same results... and i wouldn't know if it's my model or not... but, i do have different poses set in it.... please any info would be greatly appreciated... thanks

www.soundclick.com/octoberscry ---> My Doom Metal Band
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 15th Apr 2007 10:44
check your animation with this (change the frames and object name to suit your needs)



2nd point:

REM won't rotate up/down without using rotate object with mousemovey
xrotate camera 0,camera angle x(0)+mousemovey()/3.0
yrotate object 2,object angle y(2)+mousemovex()/3.0
endif

why are you y rotating object instead of camera?

shouldn't it be:
...
xrotate camera 0,camera angle x(0)+mousemovey()/3.0
yrotate camera,camera angle y(0)+mousemovex()/3.0
....
Dreamon Star
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: The Frozen Wasteland
Posted: 15th Apr 2007 20:24
Thanks for that... It says i have 25 Frames (even when i loaded an object with 500) but, none the less... for some reason only the first 5 show, so, i guess there's something wrong with my model, i'll just redo the anim part.

As for the rotate object/camera.... dumb thing on my part But, for some reason it still doesn't want to rotate up... i guess a wrapvalue may help in there though... but, it will move up very slightly, and then move back down.

Thanx again scorpyo... it really helped, in ways...

www.soundclick.com/octoberscry ---> My Doom Metal Band
Dreamon Star
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: The Frozen Wasteland
Posted: 18th Apr 2007 20:47
Would anyone have any other ideas, i'm basically using some of the code from sparky's sliding collision tutorial, but in 3rd person, not allowing the object to rotate up/down, but in first i want it the camera to rotate up/down but not the object... thanks again

www.soundclick.com/octoberscry ---> My Doom Metal Band
Dreamon Star
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: The Frozen Wasteland
Posted: 20th Apr 2007 20:50 Edited at: 20th Apr 2007 21:33
Ok, since noone is answering, I guess I am asking something wrong here... I have tried many things, if you would like to help, here is the Entire code



For the most part its' just sparkys code, minus a few things... you can just disregard the Crouching and Prone functions for the standing won't even work, little alone the others, except the speed.

As well, here is my model, just the ninja, not the scarf, so you can also remove the scarf when testing...

Another problem I have had is that because of the spherecasting, and collision it gives the appearance that the ninja is floating above the ground... Any ideas, i reduced the radius as small as possible to allow for stair climbing, and so that you don't fall through the ground.

I've also tried repositioning the model in my modeling program, but there was no result, because it's set to sphere... raycasting worked for collision straight down, but it kinda sucked when it came to the rest, it would not detect too much.

I could just make a new object for each frame, but that's just a horrible thing.... but, i may need to... since it only loops like 1 or 2 frames as compared to 12 or so.

www.soundclick.com/octoberscry ---> My Doom Metal Band

Attachments

Login to view attachments
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 21st Apr 2007 02:40 Edited at: 21st Apr 2007 02:42
Hi. I've looked at your first post and this code:



might not be working because each loop you are setting Frame# back to 14 when you say "If Move = 2 then Frame#=14". Then, later on you increase the frame to the last frame without updating the object. The frames go from 14 to 18 and the user can't even see it because it happens in the same part of your code so fast. I sugguest you try something like this:



LastMove would decide what the move was beforethe current loop. If the last move thing was the same as the current one, then there's o need to reset the frame back to the start.

Dreamon Star
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: The Frozen Wasteland
Posted: 21st Apr 2007 04:39 Edited at: 21st Apr 2007 04:43
Thanks for the advice, but for some reason even just trying to put in a simple set object frame 2,14 won't set it to that frame... i'm using gamespace for animating and 3d creations... i don't know if this had an effect on it, but, i have redone my object completely plus the skeleton, and still have no good results.

@Sixty should something like that be in the main loop, or would having it in functions as i had be ok?

It's odd because the scarf i had and using this code


would loop only the first 2 frames for the scarf (object 5) and nothing for the ninja. Yet even when i try looping the walk sequence with simply



Object 2 being the character, the scarf would still just show the first 2 frames, and nothing for the other...

MANY thanks in advance as always... thank you for the help... i'm kinda stuck here and can't really go any further until this is at least done... eeppp

OH, ps, I have tried a model with even 500 frames just to see if there would be much change, but nothing...

www.soundclick.com/octoberscry ---> My Doom Metal Band
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 21st Apr 2007 05:04
Quote: "should something like that be in the main loop, or would having it in functions as i had be ok?"


It can be in a function like you had it as well yes. Anyway, I'm unsure of what's wrong. I lack model and animation experience so that's all I had to offer.

Dreamon Star
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: The Frozen Wasteland
Posted: 21st Apr 2007 05:41
I am new to programming, and have been modelling for a bit (still learning of course) and i've animated it and it runs perfect in gamespace, but in DBP, all messed.... thank you for your help, maybe one day I'll be able to figure it out, and your info will help that day greatly... thanx 60!

www.soundclick.com/octoberscry ---> My Doom Metal Band
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 22nd Apr 2007 00:46
I'm not a Gamespace user, but usually in situations like yours, it all comes to select the right X export settings
Dreamon Star
17
Years of Service
User Offline
Joined: 24th Feb 2007
Location: The Frozen Wasteland
Posted: 22nd Apr 2007 03:34 Edited at: 22nd Apr 2007 03:42
thanks a ton scorpyo, you were right on that, because now in your frame tester, all frames do play in sequence! THANKS A LOT! As for the code, I still have issues with my code (excuse me for it) but, i cannot seem to get it to work at all... and it frustrates me so much... so, now at least i know that my code is the biggest problem. I'll keep working on it, trying to make sense of it. And 60... it seems that your code does not want to work at all, sorry... i've slowed down the sync just to see if there is any change, and there is none.... but, i'm sure i'm just missunderstanding a little... thanks so much guys...


Here's what i got incase you wish to review it.


www.soundclick.com/octoberscry ---> My Doom Metal Band

Login to post a reply

Server time is: 2024-11-25 19:23:05
Your offset time is: 2024-11-25 19:23:05