Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Rocket13531

Let me start by explaining what I'm trying to do as someone might have a better idea for how to accomplish it. Right now I have a platform entity that I wrote, which will travel either up/down, or side to side. It switches direction once it collides with the collision map or collides with another entity I created which I call "Platform Bound".

The "Platform Bound" entity is an invisible square (any size you want) that you can place with Weltmeister to easily/manually create barriers for your platform. Everything works great except for one thing: I had to set the "Bound" barrier to Passive so that the player would not collide with it. This unfortunately means everytime the platform collides with the Platform Bound that it is moved because the platform is fixed.

Of course, changing the Platform to "Passive" is a no go because I don't want active entities effecting it.

So what I'm really asking is this: is it possible to create entities which serve no other purpose but to report collisions and don't interact with the physics of other entities?

Secondly, is there a better approach to easiily managing the path of a platform within Weltmeister than I am currently thinking of?

Thanks in advance!

1 decade ago by kaboo

yep,
you can use triggers, which are basicaly invisible entities that collide with nothing and check whether another entity entered their region. you can define type [A, B, NONE] on entities and then add checkAgainst [A, B, BOTH] to the trigger and add a check function which will change direction of the platform (platform.vel.xy = platform.vel.xy * -1). watch this, by the end(10th minute or so) he is creating a trigger that kills anything that touches it, which is basically what you want, but instead of killing it you will just change the direction of the platform.

1 decade ago by Rocket13531

Excellent! Thanks so much. I had done everything except set the type of my entity bound to "B" (explaining why "check" was never registering...because the default type is none).

Thanks again
Page 1 of 1
« first « previous next › last »