playMaker

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 - picklesandtickles

Pages: [1]
1
Playmaker Help / [SOLVED] AddForce2D to Target World Position
« on: January 22, 2018, 05:40:27 PM »
Hello,

I'm having trouble with AddForce2D. I apply force towards a vector3, which I have set to a position in the World, but the object receiving the force moves in the same direction every time.

The Target position is wherever the mouse clicks, and that part works fine (Attached Position Target). I use a global variable for the position in the world and call it when applying force to the hand object (Fire Right Hand attachment).

Unfortunately, wherever I click on the screen, the force is applied in the same direction each time. See a quick video here: https://youtu.be/YeLciITtJCU

Perhaps I'm just using AddForce2D incorrectly. Any help is greatly appreciated.

2
Playmaker Help / How to detect if distance is increasing or decreasing
« on: January 14, 2018, 10:23:17 AM »
Hello,

What's the best way to detect if the distance between two objects is increasing or decreasing?

The idea I have is to take distance at time 1 distance at time 2, then subtract distance 1 from distance 2. If the result is positive, the target object is moving away from the player. If the result is negative, the target object is moving toward the player.

The result determines which event is sent next. I'm working on a script to do this, but I'm pretty new at C#, so I wanted to get your ideas first. Any advice is appreciated.

Edit: I'm messing around with Float Operator, Float Compare, and Float Sign Test, but I can't seem to get them to function with the two Get World Distance variables I've created.

3
Playmaker Help / [SOLVED] Object appear at mouse position
« on: January 11, 2018, 02:59:53 PM »
Hi All,

I'm trying to create a situation where click on the screen makes an object on the screen appear where the mouse clicked. Right now, I can only get the object to move in little increments. This is for a 2D game. Here's what I have in Playmaker:

Left Click, Store Mouse Position, Move Character

The object "Click and Move" is an Empty object whose child is the Ball Sprite. It's a normal 2D object. I set the X,Y,Z to be 0 for both the empty object and the ball sprite. Thanks for any help you can provide.

4
Playmaker Help / Issue with Mouse Pick 2D and multiple joints
« on: January 07, 2018, 07:59:33 PM »
Hello Playmaker Community,

Bottom line up front: I'm having an issue where most of the player's hinge joints fall apart and the movement becomes erratic when I try to run the FSM included in my Input Manager object with Move Towards action. Here's a demo with the FSM first enabled, and then disabled: https://youtu.be/V-v9Im0qYsg.

Now for some context: 

I'm working on a 2D game involving a player composed of sprites hooked together with multiple hinge joints (think "Mount Your Friends"). With Playmaker, I'd like to be able to click and drag anywhere on the scene, and have the central body of the player move in the opposite direction of the mouse.

In other words, when I click above the player's head and drag down, I'd like the body to move up toward the mouse, keeping all hinge joints (connecting arms and legs) connected while it moves.

Before I do all that, though, I just want to get some basics down. I've walked through a couple tutorials and read the documentation on Pick Mouse and Pick Mouse 2D to get the mouse position and set it as a target toward which the body of the player moves, but as you can see from the video above, I'm running into some serious problems.

Any recommendations for easier ways to do this with Playmaker, or if not, areas within my setup where I can troubleshoot? Let me know if you need additional information to help diagnose. Thanks!

Pages: [1]