Moving platforms?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Moving platforms?

Post by 3DModelerMan »

If I have a metaTriangleSelector and a platform that moves up and down, will the collision update?
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Ion Dune
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA
Contact:

Post by Ion Dune »

Wouldn't it be really easy to just make a quick sample and find out yourself? You're relying on someone else to know this off the top of their head, which may or may not be the case, and if its not the only way to figure it out would be to read the source or make a simple test case, the latter being the quickest and the easiest.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

The answer is yes. I've already done that, but you have an important side efect. The moving platform will colide to your objects as far as it ONLY will COLIDE with the objects. which means that, if, perhaps, an object fall over the platform, it will sustain the object indeed, but it WON'T move it along. It is complex to explain, but simply, it won't move objects along the platforms, It won't push your object, if it touches it, and keeps moving, it won't do anything else, but calculate a collision.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

ahhh

Post by 3DModelerMan »

I had that problem once with a 2D game. I had to put a 1 pixel edge on either side of the platform.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Humm...

I was thinking of updating the collision sphere with the scene at each frame... (updating the collision triangle with the scene THEN update the collsion per frame) I don't think this will work from what I read there.

The only thing i'm thinking right now is to parent the object with a "trigger zone" to the platform, so that the object will move in relation with it. If the object get out of the trigger zone, it would be necessary to unparent it.

The trigger zone would be a simple bounding box defining the area of the platform. Check if the object is in that area, if yes, check if it's parented, then parent it to the platform if necessary. If the object is NOT in the area, check if it's parented, then unparent to the platform as necessary.

Will have to try that idea when I have the time.

If some of you have tried a method would be nice the easiest one...
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

hmmm

Post by 3DModelerMan »

But what about how the parenting would affect your jump? That would have to be taken into consideration to. You could unparent when you were jumping I guess.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Post Reply