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 / Collision and animation troubles

Author
Message
Mr Niceguy
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location: The zoo
Posted: 19th Feb 2005 01:07
Okay, two questions here:

1) Check out the source code I have attached. My problem is that he the cube won't fall off the platform when he's not on it. But even stranger is that if I have my character model in place of the cube, he just floats straight upwards! What am I doing wrong?

2) I made an animation in MilkShape 3D. I exported it as a .x when I was out of animation mode, and I tried to load it into my game. But it just gives me an error. The static model (which is the exact same, just un-animated) works fine, except for my problem above. Is there something different I have to do when exporting an animation?

And I'm using DBPro.


Where my hat is at?
AlexRiva
19
Years of Service
User Offline
Joined: 29th Jan 2005
Location: Monza, Italy
Posted: 19th Feb 2005 07:32
about Question 1: Now it works.(i think you wanted this kind of falling down effect). I've put the collision between object 3 and object 5 (the big box) and added a text command that shows you at each frame if collision is on(1) or off(0). The problem was that object 1 and 5 didn't collide ever!
Alex
Mr Niceguy
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location: The zoo
Posted: 21st Feb 2005 04:58 Edited at: 21st Feb 2005 04:59
Okay, that almost works, thanks. I've got this code now for the collision:



If I move the "y#=y#-get object collision y()" and the "grav#=0.0" BETWEEN the "if object collision(1,5)>0" and "if get object collision y()>0.0", then everything works fine, except when I collide with the object from the side. Then the object 1 just moves to the top of the block, which I can't have. When I move two BELOW the "if get object collision y()>0.0" (like it is now), then object 1 falls straight through the block. What's up?

And does anyone know the answer to my second question? Thanks.


Where my hat is at?
Mr Niceguy
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location: The zoo
Posted: 22nd Feb 2005 03:41
Sorry for the bump.

I got the animation thing worked out. I used a different exporter, and it worked fine. I still have the problem with collision, though. Any ideas?


Where my hat is at?
AlexRiva
19
Years of Service
User Offline
Joined: 29th Jan 2005
Location: Monza, Italy
Posted: 22nd Feb 2005 23:47
Which version of DBPro are you using? And what kind of effect do you exactly want, since I tought you wanted a gravity effect
I suggest you to put all of your object visible and to diplay on screen the actual collision value to help you to understand what's happening to the objects.
Can you post the full updated code?

Login to post a reply

Server time is: 2024-11-27 22:53:50
Your offset time is: 2024-11-27 22:53:50