playMaker

Author Topic: Add Force 2D vs Tween  (Read 1113 times)

starfox

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Add Force 2D vs Tween
« on: January 09, 2016, 02:32:18 PM »
Hi everyone, let me preface by saying I'm new to Unity and Playmaker.

I am wondering the best practice to move a bullet? In my case I am using Unity 2D and 2D physics to make a side view shooter like space invaders.

Should I be using 'Add Force 2D' and then checking for a collision with the edge of the screen (or other things) to remove the bullet?

or

(I have the DoTween Pro asset and the DoTween/Unity Actions asset) Should I use a DoTween 'Rigidbody 2D Move Y' instead?

Which would you prefer for the right blend of performance and ease of implementation?

Are there rules around best practices for moving a bullet with Playmaker and Unity 2D?

Thanks for any help! I look forward to growing with this community and sharing tips.  :D

Zeldag

  • Full Member
  • ***
  • Posts: 198
    • View Profile
Re: Add Force 2D vs Tween
« Reply #1 on: February 01, 2016, 10:44:01 AM »
Hi, im sure you have solved it by now, but for the sake of there being at least one answer to your question:

Firstly I also am a noob.

I used this tutorial and found it very useful:

This is part4, where you learn to make melee and shooting attacks:


It is totally playmaker based.

As a noob I can summarize what he does as:

- Upon shoot button being pressed Creates a projectile object (which he saved as prefab previously) and adds velocity to this object in the correct direction.
-Upon spawning the object waits a set time before going to a state with 'destroy self' action.
-The object is tagged as projectile and enemies are FSMed to react on triggering the projectile tag.

Hope it helps someone.