playMaker

Author Topic: Itween Move to and Stop/wait when collide  (Read 4951 times)

bigcatflash

  • Playmaker Newbie
  • *
  • Posts: 3
Itween Move to and Stop/wait when collide
« on: March 14, 2016, 09:25:15 AM »
Hi Everyone,

Firstly...apologies as I new to playmaker and unity, but really enjoying it so far.

I'm basically trying to move an object (TA Bus) and have it stop when it hits another object , but then moves again towards its original destination when the object in the way has moved.

I've copied my playmaker FSM below.

1) Can playmaker recognize the Collison event part way through the Itween move to? (as ive got my FSM set up). The object spawns fine, then moves to its destination, but doesnt seem to stop when it collides with other objects (the state doesnt change)

2) My other worry is that from reading here there are some tricks around setting up the objects in unity (i'm using box collider - but have also tried mesh collider - both ways dont seem to be triggering the FSM to move to the 'wait for space state'.

Any help or advice would be greatly appreciated! Thank you so much

Zeldag

  • Full Member
  • ***
  • Posts: 198
Re: Itween Move to and Stop/wait when collide
« Reply #1 on: March 14, 2016, 11:43:22 AM »
Hi and welcome to the forum!

Hopefully it may be as easy as adding a rigidbody to both the bus and the victim (lol), that is if they both havnt got them already.

And i assume both have colliders on?

The rigid body may take some tweaking, like you may want to disable gravity and make it kinematic (or not, it depends on things i dont quite understand yet as im a noob myself), but i find playing with those two tick boxes gets my rigid bodies working right.

Good luck with it and let us know how it goes!

bigcatflash

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Itween Move to and Stop/wait when collide
« Reply #2 on: March 14, 2016, 06:39:52 PM »
Thank you Zeldag for your reply and welcome :-)

Have tried that, and it doesn't seem to have any effect. I'm wondering if its itween move to and not wanting to do anything else until it reaches its destination. Im thinking I might try moving the bus with something other then itween and seeing if physics then comes into play.

thank you very much for your suggestion though.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Itween Move to and Stop/wait when collide
« Reply #3 on: March 14, 2016, 09:16:12 PM »
Hi,

Are you looking for this kind of behavior?


Btw. itween is very laggy, Dotween is a lot better and there is a free version on the asset store istall that before you get the actions from here

bigcatflash

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Itween Move to and Stop/wait when collide
« Reply #4 on: March 14, 2016, 09:36:13 PM »
Hi Dino,

This is EXACTLY what i'm trying to do..thank you so much. I'm just running out the door now, but will take a good look tonight when i get home.

You are a legend...thank you :-)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Itween Move to and Stop/wait when collide
« Reply #5 on: March 15, 2016, 05:31:16 AM »
Hi,
Thanks, let me know if you got it working and please add [Solved] to your topic :)