[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: 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 112: 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 112: 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 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
Chipmunk Physics • View topic - seesaw platform problem

seesaw platform problem

Discuss new features and future development.

seesaw platform problem

Postby JohnL » Mon Jul 02, 2012 5:15 pm

JohnL
 
Posts: 2
Joined: Tue Jun 12, 2012 4:36 pm

Re: seesaw platform problem

Postby slembcke » Mon Jul 02, 2012 6:03 pm

Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: seesaw platform problem

Postby JohnL » Thu Jul 05, 2012 5:15 pm

Thank you for such quick reply.

I've only just manage to find time to get back onto this problem.

Your first solution didn't work because the I got 0 from cpBodyGetAngVel(body) which would have been division by zero and chipmunk threw an exception error soon after.

Anyway, my problem was that I was rendering the scene from the variable m_floorAngle and not from the physics engine floor->body->angle which has moved since then. Face palm! This explains why it was a frame out. Your explanation has helped me a lot anyway and so I've changed the way it works by accelerating/de-accelerating the angle velocity and then called cpBodyUpdatePosition(); I'll be moving sideways eventually so updatePosition() will serve both purpose.
JohnL
 
Posts: 2
Joined: Tue Jun 12, 2012 4:36 pm

Re: seesaw platform problem

Postby slembcke » Thu Jul 05, 2012 11:36 pm

Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron