hardbody physics interacting with keyframes

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
ohiovr.com
Posts: 1
Joined: Fri Aug 03, 2007 4:40 am

hardbody physics interacting with keyframes

Post by ohiovr.com »

How do I integrate a keyframed motion into the game engine?
fast solve
Posts: 16
Joined: Tue Jan 02, 2007 1:57 am

Re: hardbody physics interacting with keyframes

Post by fast solve »

Step 1: Select an object that has an IPO curve in the IPO curve editor (which will move if you hit Ctrl + A in the 3d viewer)

Step 2: set up logic bricks like this: Always (or what ever sensor you need) -> AND -> IPO



Use default settings for always. The AND controller can be an OR if needed. The IPO actuator has several play modes:

Loop end: Every time it's trigered, it goes all the way to the end of the IPO (start and end dictate the starting and ending frames) and stays at the end. Re-trigering causes the IPO to instantly jump back to frame 1 for the object and play the loop again, but only if the object has completed the loop at the time of retrigering.

Loop Stop: While it's trigered, the IPO loops through like music on continuous playback. But as soon as the triger stops, the animation pauses. When the triger starts again, the animation continues where it left off.

Flipper: Like from pinball: While it's trigerred, it plays through, stopping if it reaches the end. When it isn't trigered, it plays backward untill it reaches the beginning. This mode responds immediately to the triger, i.e. if it's going backwards and the triger turns on midway through, it starts to move fowards right away.

Ping pong: Once triggered, it moves all the way to the end. When re triggered, it moves back to start. But holding down the trigger won't keep it going back&forth, each time the trigger has to turn off then turn back on. Think of a handgun, bullets don't keep coming out if the trigger is held in the pressed position,

Play: Just like Pingpong but instead of playing backwards after being triggered after hitting the end it
(after hitting the end and being triggered again) instantly resets and plays again.