PDA

View Full Version : [AS3] Pendlum physics


sam.uk.net
09-08-2009, 09:14 PM
Hi people,

EDIT: Apologies for the incorrect spelling of "Pendulum" in the thread title.

I'm making a simple little game where you can click and swing around a little character using the mouse and keyboard. The character should swing around a little post the player clicks on, dangling off a little rope.

I'm for the kind of movement in this game: http://www.doublewiresgame.com/

I figured I'd need a kind of pendulum effect, but something controllable but realistic. I coded up a pendulum, but I'm a bit stuck on how I would actually make this player controllable and interactive. So depending on the angle and position of the character and post the character will swing on his little rope at different speeds.

Another small little problem is how to make a rope that the character swings on. Something thats flows and moves appropriately like in the double wires game (link above).

My game is only intented to be a lightweight game thats just fun to control the character and swing endlessly, so nothing needs to be epicly perfect. I'll probably end up using this game as like a little preloader game.

Sorry if I haven't made myself clear and thanks in advance for any help or resource pointers. If you need any more info about the problem then just ask.

:D


sam.uk.net

cjx3711
09-24-2009, 03:18 PM
Basically you want an object attached to a rope for the user to fling around?

I've tried (and failed) to code something like that before. Well, I didn't really spend much time on it. But for the rope, you need inverse kinematics. Alternatively, you need a physics engine. That's all the advise I can give now.

sam.uk.net
09-24-2009, 03:41 PM
Hi

Thanks for your reply :D

I'll look into a physics engine I used a while ago....its just the rope graphic that seems to be the main problem of them all.

Inverse kinematics...:eek: eeek!

:)


Thanks again
Sam