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

Pages: [1]
PlayMaker Help / Re: Link animation to object movement
« on: November 17, 2012, 11:57:35 AM »
Two ways: some of the enemy AI's are moved along an iTween path. The others I'm moving via FSM MoveToward, setting the player as the target.

I could have the animation play in the same state as the MoveToward, but what happens if the player quits moving and the enemy AI arrives at the player's location (plus the programmed offset)? In that case, the enemy AI is still playing the walk animation, for example, even as he doesn't go anywhere. That looks strange, doesn't it?

PlayMaker Help / Re: Link animation to enemey AI movement
« on: November 17, 2012, 08:59:23 AM »
Ah, yes. I understand well how to check if the player's character is moving. I mean a non-user controlled character, for example, an enemy AI.

While the enemy AI is advancing toward the player, his walking animation should play. When he reaches a certain point and stops, his walking animation should also stop and transition to a standing pose.

I should have worded the Subject line of my question more clearly. Thanks, though, for your reply.

PlayMaker Help / Link animation to object movement
« on: November 16, 2012, 10:49:20 PM »
What's the best way to link an animation (say, a walk cycle) to an object's movement. I want the animation to play only while the object's transform is moving. I want a different animation to play once the object is no longer moving.

I'm sure this is covered somewhere, and I'm just not finding it. Thanks.

Well, I think I've diagnosed the problem, and it has nothing to do with playMaker.

I set up a clean project, excluding playMaker. I made two simple scripts (from this YouTube tutorial: ), one which instantiates a missile, and one, on the missile itself, which positions itself and guides itself to a preset target--a simple homing missile.

In the tutorial the instantiation script, attached to the Main Camera, instantiates the missile on the Main Camera, and the homing script, attached to the missile, guides it to the target.

In my version, the instantiation script, attached to the Main Camera, instantiates the missile at 0,0,0 (just like the BowLauncher script had been doing in my game scene), and the homing script, attached to the missile, causes the missile to vibrate back and forth, going nowhere in particular.

I don't know what's wrong yet, but at least I know it isn't playMaker, so I think I'll go on over to the Unity Forum.

I'd mark this question "solved", but I haven't figured out how yet.

Thanks to everyone who has taken a look.

Sure, thanks. I don't know what you mean by "third person model of the weapon". If you're asking whether I've used the player or the player's weapon as the spawning point for the arrow, then yes, I've done both. Neither seems to work.

Sure, here is a shot of the FSM and the arrow (prefab) it has positioned in outer space.

I have attached an FSM to the "Players_Bow" prefab and used the location of the Players_Bow prefab as the location where I would like the arrow prefab to instantiate. The Players_Bow prefab has already been instantiated in the attached scene, and the state "Fire_Arrow" during which the arrow prefab is instantiated at the Players_Bow location is now active.

Rather than instantiating the arrow at the Players_Bow location in world space, it seems that it has instantiated the arrow very near to what the Players_Bow's local location, taken as a world location, would be, i.e. close to world 0,0,0, way out in outer space.

I don't know how to tell the FSM to instantiate the arrow at the Players_Bow's world space.


Well, I used an empty game object as a placeholder for the weapon which would become the prefab. I then set the weapon's local position and rotation to zero, and then moved and rotated the empty game object around so that the weapon was where I wanted it. Then I saved the weapon as a prefab and deleted the weapon from the scene.

When I tried to use the placeholder as the spawn point of the weapon prefab, however, the position and rotation for the instance of the weapon came out all wrong.

So, as far as I can tell, I've tried to set it manually, without success. Did I do something wrong in setting it manually?

Thanks for your help.

I've attempted to use the Create Object Action to instantiate a prefab as a child of another game object, and then use that game object to set the prefab's Spawn Point.

Since the prefab is a weapon, and I'm attaching it to the first person controller, I want it to stick out a bit from the body. I set a position and rotation in addition to the Spawn Point to achieve that.

When I hit play, though, things go awry. The prefab is not in the correct location, and the rotation is off. What am I doing wrong?


PlayMaker Help / Re: Animation Looping Option Missing
« on: October 20, 2012, 12:01:02 PM »
@ kiriri

Thanks for the reply.


That solved the problem. Thanks a million, man.

PlayMaker Help / Animation Looping Option Missing[SOLVED]
« on: October 19, 2012, 11:33:08 AM »
Hi, I'm new to the board. I apologize if this question has already been answered somewhere. I have looked for several minutes now and have not found a solution.

Problem: I created an animation cycle in Blender and imported the object into Unity as an FBX import. The animation imported into Unity just fine. I imported the object into the scene, added an FSM to it, and selected "Play Animation" as its first action. I found the animation I created in the FSM drop down menu. When I clicked on "Loop Event" in order to set the animation to loop, the only option was "none". When I hit Play, the object completed only one cycle and stopped, failing to loop.

I don't understand why the Loop Event drop down menu will not allow me to set the animation to loop and how to fix it.

Thanks in advance for your help.

Pages: [1]