[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Preventing ice-skating in player models (Darkplaces)

Preventing ice-skating in player models (Darkplaces)

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Preventing ice-skating in player models (Darkplaces)

Postby JasonX » Fri Apr 13, 2012 1:57 am

I could not find any information on this: ice-skating is a big problem and quite hard to fix. Does anyone know how big projects managed to get around this?
JasonX
 
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Re: Preventing ice-skating in player models (Darkplaces)

Postby Spike » Fri Apr 13, 2012 2:20 pm

I assume you mean purely in regard to animations, rather than an actual bug?

if you're making your own gamecode+models+etc, you'd use skeletal models.
You'd then have one animation (read: framegroup) for running forwards, and one for running sideways. Both animations must have the same duration.
you'd then figure out which direction the player is moving in, and then blend them according to the direction the player is facing or so (if running at 45 degrees, 50 50). The time into the animations to use is based upon the distance traveled, and both use the same animation time - this keeps the legs in sync even if the player suddenly changes from 100% forwards to 100% right (in reality, the direction traveled will follow a curve, as quake's direction changes are not instantaneous, thus the animations do need to have similar timing).
You'll need to blend towards an idle animation so the legs don't freeze completely in some weird frame if the player is standing still.

Read DP's documentation on the FTE_CSQC_SKELETONOBJECTS extension for the engine calls to make. Note that this extension allows full separation between upper and lower body parts, and you can have a separate head/mouth for 'free'... thus no more running-on-the-spot when shooting, etc.
Yes, this stuff does require csqc. DP does support server side skeletal objects too, but bandwidth, interpolation, etc will make them unusable for actual animations.

note that v_right*normalize(self.velocity) will be 1 if self is moving to the right, -1 if its moving to the left, and 0 if its not moving sideways (essentually, right*velocity rotates velocity into modelspace). do the same with v_forward and use pythagoras to work out which forward/right/left/back animations to play.

Its jumping that's the annoying part.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Preventing ice-skating in player models (Darkplaces)

Postby JasonX » Fri Apr 13, 2012 3:20 pm

Thanks spike!
JasonX
 
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Re: Preventing ice-skating in player models (Darkplaces)

Postby toneddu2000 » Sat Apr 21, 2012 11:49 am

if you should achieve some results on the skeletal animation topic in DP, PLEASE post it, because there's no such a documentation about it :)
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest