playMaker

Author Topic: Look at 2d  (Read 3539 times)

ghost010

  • Junior Playmaker
  • **
  • Posts: 51
Look at 2d
« on: March 11, 2014, 07:13:26 PM »
I already asked this in the help section,but no luck so far.
So i was hoping that any one could make a custom action for this?

Quote
I'm currently looking at Angry Ships and it has almost the exact movements i need. apart from 1 issue,its a top down.
And im making a side scroller.
The smooth look at and mouse pic does almost do what i want it to do.
There is a mouse pic 2D..but not look at 2D.

Any solutions to this?
Id hate to flip my project to top down.

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Look at 2d
« Reply #1 on: March 11, 2014, 07:57:10 PM »
I kept that other post on notify in case something came up but I got something to work thanks to a couple of posts around here.

I also have a side scroller and found this to be the best solution for my game.

I jumbled this script with the help of Jean's LookAt2. Basically here is what you have to do.

-make an empty gameObject
-set the X Rotation to 90
-add an fsm on the empty gameobject
-I am using a touch object event with remote app on android but you could also use mouse pick.
-make a new vector 3 called position
-in touch object event set the Store hit point to Position//In the mouse pick set the store point to Position.
-add this script found here and set the target position to Position
-set the Up vector to x 0 y 0 z 1
-Now drag the object you wanted to spin and set it as a child to the empty game object.
DONE!

Hopefully a much simpler action comes along.
« Last Edit: March 11, 2014, 08:06:50 PM by sebaslive »
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez