playMaker

Author Topic: Add Force in direction/rotation [SOLVED]  (Read 3060 times)

MarkD

  • Full Member
  • ***
  • Posts: 113
Add Force in direction/rotation [SOLVED]
« on: April 26, 2014, 12:39:47 AM »
Heya,

In my project I've created a turret that fires projectiles but I can only get the projectile

The turret does the following:

- The turret gets its position and stores it
- Using create object it loads a projectile prefab object

The projectile then does the following:
- Using Transform direction I store the direction
- Add Force on the Z axis, from position set from the Transform above, space set    to self, force mode set to force

The projectile fires like expected as a I rotate the turret until a certain point.  When Y is from 0-45 and 360-315 it fires on a correct angle.  Beyond those points it starts firing from the opposite angle/side. 

Ideally, the turret would load an object in 360 degress and the projectile would fire in that direction.

Does that make sense?  Any ideas on to accomplish this?

« Last Edit: April 27, 2014, 12:25:05 PM by MarkD »

MarkD

  • Full Member
  • ***
  • Posts: 113
Re: Add Force in direction/rotation
« Reply #1 on: April 26, 2014, 01:23:09 PM »
Never mind!  Problem solved!  I found this video that answered all of my questions.  I was way over complicating things (as usual!)!


Thanks, btw, this tutorial is great!