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 Discussion / 3d "push" collison?

Author
Message
D18AGON
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 16th Jul 2006 20:30 Edited at: 16th Jul 2006 20:36
Is there any way to make 3d object "push" collision in DB? for e.g. If like u have an anim of a guy doing a karate punch and another anim of a guy doing a karate upper block, can i code it so the punching arm of the punching anim is pushed up as its blocked? Or do I have to set the arm to rotate up? If so, then how do i make the arm rotate up smoothly so it doesnt just instantly appear in the new position? Or like is there some sort of way to set interpolation between rotation positions of an animation/object/limb? I'm sure there is, I just need a working example of how to do it thnks.
UFO
20
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 17th Jul 2006 01:00
You could rotate the arm into the new position. To make it smooth, checkout the curveangle() command.
You use it like this:
curveangle(destination angle,current angle,speed)

Hope it helps

D18AGON
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 17th Jul 2006 04:16
wow cool man that looks like it might just work! I must have missed that command I had no idea it existed. Will try it out now...Thnks.

Il tell u how it goes...
UFO
20
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 17th Jul 2006 22:38
np

Hope you can get it to work

D18AGON
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 23rd Jul 2006 00:49
umm so how can I apply that curveangle command to a limb like the way I would using rotate limb? Sorry I tried and I am lost coz I dunno how to apply it to a limb which it what I need. Do I need to make some sort of variable? Thnks
UFO
20
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 23rd Jul 2006 05:17
Here is a sample with 2 boxes, one as a limb of the other. It demonstrates the use of the curveangle function. Just adapt that one rotate limb command for your object and change the speed, and it should work. I hope it helps



D18AGON
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 24th Jul 2006 03:00
ok one more question, how can i apply this to start and end the rotation at specified frames of the object/anim? (ohh I havnt got what uv'e given me so far to work really yet ) umm here is my code so far..you think u could add to it too make the punching arm to rotate up about 35 degrees starting the rotation at say frame 71 and ending at the last frame in the new end position and then post the my fixed up code? Thnks man that would really help a lot!

UFO
20
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 24th Jul 2006 18:39
I think this is DBP, so I can't really help you get my code to work since I only have DBC. I don't even know if DBP has curveangle and everything. Sorry. I know for a fact that DBC doesn't have a move object right command. Try posting this in the DarkBasic Pro board or the newcommers board.

Login to post a reply

Server time is: 2026-07-07 05:37:34
Your offset time is: 2026-07-07 05:37:34