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 / collision update on animation frame

Author
Message
Mychal B
13
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 12th May 2011 16:42
Hey everyone,
I am using sparkys and I just made a door animation with blender which works awesome! .X format. Only problem is that I can't figure out how to update sparkys so I cant go through the door when its closed, and can go through when its open.

If nothing else I can just hide a dummy at the door and check whether or not its open and set the collision off/on, but I really don't wanna go that rout.

Thanks for the help!
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 12th May 2011 16:57
Try sc_updateobject. Maybe it'll work.

WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 13th May 2011 00:31
If the door has a frame as well then you will need to set it up as polygon or complex collision first. Then as kamac says, use update object each time it animates.

Warning! May contain Nuts!
Mychal B
13
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 13th May 2011 02:19
Iv'e tried that and it plain ol doesn't want to work. I'm kinda wondering if this might also be because I scaled it. I did use sc_allowobjectscaling, but sometimes when I scale objects it gives me trouble. Another thing I was thinking of was that I might not have exported everything that I needed
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 13th May 2011 02:36 Edited at: 13th May 2011 03:23
Hi there.

what I`ll do to open the door, instead of animating the door playing frames, I prefer to rotate the limb of the door object the quantity necesary to make it open or close.

RE-EDITED
AAagH!! I have checked and that´s not as I thought ...sorry . I just thought it was like intersect object...I will find out if it posible without a dumy object.

RE-EDITED AGAIN !!


I GOT IT !!

I have a small room and I have rotate one of the walls, and if I tray to go through it, ti make me stop, and if I put behind the wall, it push me away !! fantastic !!

This is the way we have to setup the object
imagine we have the wall rotating with variable gl#

sc_setupComplexObject my_object,1,2
rotate limb my_object,16,0,0,gl#
sc_updateobject my obect

That works...a litle bit jumping but works.

Cheers.

I'm not a grumpy grandpa
Mychal B
13
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 13th May 2011 08:51
I ended up trying out using the dumby and it works nearly flawlessly. The door swings open really fast so nothing ends up walking through the door Now I just have to figure out how to export my texture with my model in blender
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 13th May 2011 14:50
Nice one! I do tons of fiddling with collision code before I eventually get something that works correctly.

Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-04-19 22:16:45
Your offset time is: 2024-04-19 22:16:45