PlayMaker Help & Tips > PlayMaker Help

Static game objects [Solved]

(1/1)

jgalvezpa:
Hello how can i put to Static a game object in the FSM, im doing like a freezing effect i put the object to sleep but when they collide to others objects they wake up and i want that.

i want to put them to static so they cannot interact with others objects.

Breadman:
If I understand correctly, you're trying to create an object that interacts with other objects only during certain time intervals, or events.

If that's true, you could create an FSM attached to the game object where it's "idle" and has no collider component attached (other objects will pass through this object).

When something happens that you want to "wake up" the object, add a state that is triggered by whatever "wakes" it - a character collides with it, maybe. On this event, the FSM would switch to a new state, using the "add component" PlayMaker action. Inside this action, choose "box collider", "mesh collider", or whatever type of collider you need!

When it's time for the object to return to the idle state (perhaps the character stops touching the object, for example), add the "destroy component" action to remove the collider when it returns to the previous state.

Navigation

[0] Message Index

Go to full version