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.

Dark GDK / Animation and Sparky Question

Author
Message
Yero008
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location: Romania
Posted: 9th Aug 2011 22:54
Hi,

I am using this code to animate an object:

The problem is that my sparky Collision won't update it stays like in frame one. Is there anything I can do to make it update? The animation is something moving that was supposed to push the player of if it's hit.
Forward Thanks!
Dodga
14
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 9th Aug 2011 23:30
It's probably the way you are setting up the object, paste your SC_SetupObject code.
Yero008
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location: Romania
Posted: 10th Aug 2011 00:21
This is how I set up the object:
dbLoadObject("level1/ciocan_a.x",ciocan);
SC_SetupComplexObject( ciocan,1,2 );
Dodga
14
Years of Service
User Offline
Joined: 12th Dec 2009
Location:
Posted: 10th Aug 2011 03:47
Most likely the reason is because the object moving is a limb, not an individual object. What you can do if you really need to animate this within your xfile is find the limb number of the part of the object that is animated, then clone the limb as an object and position the object at the limbs offset from 0, so basically you would position the object like this:

dbPositionObject(clonedlimbobject, dbObjectPositionX(originalobject)+dbLimbOffsetX(limbnumber), dbObjectPositionY(originalobject)+dbLimbOffsetY(limbnumber),
dbObjectPositionZ(originalobject)+dbLimbOffsetZ(limbnumber));

Then you would check for collision based on the cloned object not the original object, you'll want to hide the limb on the original object.

Login to post a reply

Server time is: 2024-05-23 15:14:03
Your offset time is: 2024-05-23 15:14:03