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.


Messages - krmko

Pages: 1 ... 60 61 [62] 63 64 ... 67
916
PlayMaker Help / Re: 2 questions regarding facing direction in 2D
« on: January 11, 2017, 04:13:02 AM »
I kind of solved the part of the second problem by spawning an object on PlayerPosition location which moves on the negative X axis, so the enemy chasing it with Move Towards action never manages to reach it and thus stop moving. Since it remains on the exact Y point, but not on the exact X point, it's not quite as precise, but it does the job.

Though i would like to hear how can it be done the proper way, as described in the image.

917
PlayMaker Help / Re: Translate Movement unexpected behaviour
« on: January 11, 2017, 03:23:52 AM »
Hello Jean,

i haven't tried non rigidbodies, i'll test it out and let you know.

Move Position is, at least for me, too much complication for such a game, i'd have to save coordinates as variables, than add float just to move the object, translate works much simpler for linear movement.

Thanks!

918
PlayMaker Help / 2 questions regarding facing direction in 2D [SOLVED]
« on: January 10, 2017, 05:06:19 AM »
1. I've got some paths that i'm using in Simple Waypoint System in 2D, and this is what i'm basically trying to do.



Ship in the upper part of the waypoint moves as set in transform, but i want it to flip sprite or change it's Y rotation when it starts moving right, like the one down. It uses Catmull Rom without locked positions, so it always faces forward. Changing the transform or flipping a sprite is not a problem, but i don't know what parameter should i listen as a condition.

I'm pretty bad with quaternions, vectors and other rotation related stuff, so i'd really appreciate some help, i'm sure it's simple :)

2. I've got a type of enemy that measures distance from the player, once it is in range, it gets player position in that moment (let's name it PlayerPosition), and speeds up towards PlayerPosition with Move Towards. However, i don't want the enemy to stop when it reaches PlayerLocation, i want him to continue moving until it gets off screen. That's the first part of the problem, how to get the direction of movement and continue moving along it. The second is that i want the enemy to rotate towards the PlayerPosition.

As i said, i'm not really proficient with rotations, i've been checking out unity forums, and i see that some of the solutions include quaternion lerping/slerping, but i'm not sure how it is used. I tried using vector3 rotate towards, but to no avail.



919
PlayMaker Help / Re: Translate Movement unexpected behaviour
« on: January 10, 2017, 12:48:41 AM »
Hi Jean,

yes, Rigidbody 2D.

920
PlayMaker Help / Re: Translate Movement unexpected behaviour
« on: January 09, 2017, 03:54:55 PM »
Here it is



When i set X to "none" instead of "0", it begins behaving like described.

921
PlayMaker Help / Re: Translate Movement unexpected behaviour
« on: January 08, 2017, 09:04:08 AM »
I manually set nonaltered transition values to "0" instead of "none" and it works ok. I think this is a bug.

922
PlayMaker Help / Translate Movement unexpected behaviour [SOLVED]
« on: January 08, 2017, 08:56:14 AM »
Hello,

i'm using a quite simple FSM for translating the object depending on its position. I get the objects position, and i compare it to float values, which are thresholds that determine the movement direction.



As you can see, there are four possible outcomes:

1. If the object is instantiated on the upper portion of the screen, it translates down
2. If the object is instantiated on the lower portion of the screen, it translates up
3. If the object is instantiated on the left portion of the screen, it translates right
4. If the object is instantiated on the right portion of the screen, it translates left

3 and 4 work great, but when it instantiates up or down, the Y axis movement is ok, but it also applies the same amount of translation to the negative X axis, so the object move down/left when it is instantiated in the upper part of the screen, and up/left when it's instantiated in the lower part of the screen.

Any ideas what's going on? No translation is being set until the final states.

923
PlayMaker Help / Re: UI Menu on game object.
« on: January 04, 2017, 10:25:10 PM »
I don't understand what seems to be the problem? How do you plan to touch it if you don't use touch object?

You have million ways to do it but you're not being clear enough what exactly do you want to achieve.

If you want it to be like on the picture, make a small canvas with UI elements and deactivate it on runtime. Activate it again when you touch the spot, deactivate it when you touch somewhere else.

Or you can use multiple cameras or culling to simply hide it instead of activate/deactivate it.

924
PlayMaker Help / Re: Get Position / Set Position problem
« on: January 04, 2017, 07:19:44 AM »
Update:

things work as intended when i parent the spawned object under the spawner, but i don't want to insert more steps than intended, and i find this one more than unnecessary. What's the catch?

925
PlayMaker Help / Re: Get Position / Set Position problem
« on: January 04, 2017, 06:06:33 AM »
I created a simple cube in the scene for the sake of testing. In the Set Position action the Game Object is set to "Use Owner", Vector is set to "None", X, Y, Z are the desired values, and Space is set to "Self".

The action works as intended. When set to self, the center of the object itself is actually 0,0,0, and i just tweak it by entering values in X, Y, Z boxes.

YThe thing is, i have multiple objects spawning at the spawner location, and i need their positions set in a pattern, so i need to nudge each of them locally a bit. I excluded the whole Get Position of the spawner because it's irrelevant, when they spawn, they spawn exactly on the spawner, as intended, and set position should work normally, but instead of self, the spawned objects use world space. When they are spawned, they have nothing to do with spawner anymore, they're not parented or anything.

Only thing that comes to my mind that can cause trouble is that i save the spawned objects in gameobject variable so i can manipulate them, and then i set position via those gameobject variables. I'll try inverting the transform point to see if it does any good.


926
PlayMaker Help / Re: Get Position / Set Position problem
« on: January 04, 2017, 02:48:09 AM »
I don't know why am i getting the spawner position in the first place, the objects spawn on 0,0,0 of the spawner.

The way i see it, i should just set spawned objects' position relative to self, but they set themselves relative to world space (where 0,0,0 is world center), how come?

927
I got this sorted out, the hard way unfortunately.

928
PlayMaker Help / Get Position / Set Position problem
« on: January 03, 2017, 02:35:55 AM »
Hi guys,

i have a small spawner which is supposed to spawn gameobjects in a a pattern (spaceships spawning in arrow formation). Spawner is an empty object with an FSM which contains one state and the following actions:

Get Position - Getting the position in World space and storing it as Vector3 variable Spawner Position.



Spawning a GameObject - I'm using Core GameKit for spawning. Spawn Position Mode is set to Use This Object Position to Spawn on the place of the Spawner, and i store the Spawned Game Object as GameObject variable.



Set Position of a GameObject - For the GameObject whose position i want to set i choose stored GameObject variable, select Spawner Position for the Vector3, and adjust X, Y and Z position relative to Self Space.



But, the object sets it position relative to world space and it appears near the world center.

Any ideas what i'm doing wrong? I had a similar setup with with two different objects (Spaceship and a GunPoint spawning on a defined space on the spaceship) and things worked fine. Spaceship had the Get Position on itself, and it stored the position in vector3 variable in world space. The GunPoint had Set Position, used the Spaceship vector3, and Space set to Self and it worked, i don't know what's different here.

929
You have an action named CONDITIONAL EXPRESSION.

930
Action Requests / Re: Check for visible objects with TAG
« on: January 02, 2017, 08:33:45 AM »
Just wanted to let you know i've done it with arraymaker, quite a handy tool!

Thanks for the help, terri ;D

Pages: 1 ... 60 61 [62] 63 64 ... 67