Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Nils Anderssen

Pages: [1]
General Discussion / Object following the cursor?
« on: December 01, 2014, 04:35:05 AM »

I am trying to get a game object to follow the cursor, but without luck, so I am wondering if anyone has any good pointers on what to do. I guess the solution to this would be fairly easy, but I have not succeeded in finding it.

Any help is very appreciated.

I have tried a couple of different approaches. The first one is to use the mouse pick action (1, 2 and 3) and get the position from that. That kind of worked, but only when I moved the mouse very slowly. When i moved it somewhat quicker, it only returned 0.0.0 as the position. I used the set position action on the game object, so that returned to that position.

The second approach was to use the get mousex and y action and that worked better, but the numbers I got from it did not correspond with the size of the screen. It only moved a bit in the middle.

To clarify, I am only trying to move the object in X and Y, not Z.

All the best


General Discussion / Angle to a target
« on: June 02, 2014, 10:46:48 AM »

I am trying to set up a FSM that can determine if an gameobject is left, right, front or back to another gameobject, but have been able to do this successfully.

I have tried to use the "Get Angle To Target" script that is already in Playmaker, but it only gives me the angle with the shortest route from the front of the object, so I have no idea if it is left or right.

Is there any other way I can do this?

I have tried to install this script, but Unity crashes on load if I do so:

I guess it is not hard to do this, but atm. I am out of clues. Thanks to those who take the time to answer :)

Pages: [1]