playMaker

Author Topic: Move gameobject around another gameobject [Solved]  (Read 1871 times)

arwengrim

  • Playmaker Newbie
  • *
  • Posts: 7
  • Learning making games
    • LittleMonstr
Move gameobject around another gameobject [Solved]
« on: September 24, 2013, 05:50:59 AM »
I'm new to Unity and Playmaker but have learned quite a lot the last few weeks. I have been able to find the answers to all my questions in the forum so far but this time I can't seem to find one (probably because I use the wrong search terms).

I want to move a gameobject (eg an enemy) around another gameobject that has a rectangular shape:



Could anyone please hint me in a common direction? Should I use raycast or is setting an iTween path the way to go, perhaps there is some even easier method that I haven't found out about? I think the size on the rectangle might change on different levels later on as I move to designing levels.
« Last Edit: September 24, 2013, 07:02:39 AM by arwengrim »
I'm learning to make games. Please bare with me :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Move gameobject around another gameobject
« Reply #1 on: September 24, 2013, 05:56:36 AM »
Hi,
 
iTween could be a good thing here, and as you adjust the sizes, you simply adjust the path. That's the most straight forward method. When you want your ennemy to start doing something else, simply disable that itween path and feature and have your ennemy do something else.

 Raycast is possible, but only dive into this if you know you will have a lot of possible variants to this set up ( go around spheres or actually any walls). this will work, but requires a higher level of understand about Unity,PlayMaker and algorythm to do this properly.

Bye,

 Jean

arwengrim

  • Playmaker Newbie
  • *
  • Posts: 7
  • Learning making games
    • LittleMonstr
Re: Move gameobject around another gameobject
« Reply #2 on: September 24, 2013, 06:04:42 AM »
Thanks :)

So far I've used raycast along with iTween to simulate my own gravity since the built in Unity gravity don't give me so much control as I need. But for this task perhaps iTween path is better.
I'm learning to make games. Please bare with me :)