playMaker

Author Topic: Playmaker spawning projectile issue. (SOLVED)  (Read 3529 times)

WayneAdams

  • Playmaker Newbie
  • *
  • Posts: 17
    • Glacier Studios
Playmaker spawning projectile issue. (SOLVED)
« on: September 20, 2016, 10:13:56 AM »
First I apologize if this is a repeat to some of you. I searched the forums for an answer but couldn't find one. I am basing this work on the following tutorial:


My issue is that something is dragging my projectiles down with the level's gravity. However the spawning object nor the projectiles themselves use gravity. I have attached several screenshots, they are large so I have not used IMG tags on them.

https://i.imgsafe.org/14134afca5.jpg
https://i.imgsafe.org/1413810425.jpg
https://i.imgsafe.org/14138afff1.jpg
https://i.imgsafe.org/141398094f.jpg


I appreciate any help. Thanks!

EDIT: Additional information:
If I remove the rigidbody comp from the projectile they still fall.
The spawning object stays with the player, so since projectiles are not spawned until the A button is pressed there is actually nothing in the scene that the projectiles should be connected too. yet when firing rapidly from the screenshot, the rounds are clearly attached to some object which is dragging them down. This object is unseeable in the scene game and hierarchy windows nor is it selectable.
 
2nd EDIT: Additional information:
This also appears to be random. If I rapidly fire away, some of the projectiles will spawn and translate correctly, but there is no method for determining whether or not a projectile will spawn at the spawn object OR if it will spawn at the ghost object being pulled down by gravity.
« Last Edit: September 23, 2016, 05:53:19 PM by WayneAdams »

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Playmaker spawning projectile issue.
« Reply #1 on: September 20, 2016, 12:29:42 PM »
Are you making sure there aren't any collisions rotating the projectiles as you shoot? Either on the spawner or the player.

WayneAdams

  • Playmaker Newbie
  • *
  • Posts: 17
    • Glacier Studios
Re: Playmaker spawning projectile issue.
« Reply #2 on: September 20, 2016, 12:59:39 PM »
There are no collisions on the spawner and the spawner does not collide with the player volume. Unless the player is against the wall the spawner isn't in contact with any collider. So when the projectile spawns, which does have a collider, it isn't interacting with any existing collision in the scene. (again unless the player is against a wall) but even with everything turned off with only the player and the ground existing in the scene, some ghost object is interfering with the spawning of the projectile.

terri

  • Sr. Member
  • ****
  • Posts: 386
    • terrivellmann.tumblr.com
Re: Playmaker spawning projectile issue.
« Reply #3 on: September 20, 2016, 01:59:35 PM »
Could it be the player itself?
If you spawn then projectile without translating it, is it correctly rotated?

WayneAdams

  • Playmaker Newbie
  • *
  • Posts: 17
    • Glacier Studios
Re: Playmaker spawning projectile issue.
« Reply #4 on: September 20, 2016, 02:27:02 PM »
Interesting enough, unparenting the spawner object from the player in the hierarchy seems to fix it, however, now the spawner isn't going to work with the player..

https://i.imgsafe.org/17ece8a735.jpg
https://i.imgsafe.org/17eccc4a5d.jpg

I don't understand why the spawner works unparented and not as a child of the player object, nothing else in the player object is being pulled down. Everything remains put in the scene.

EDIT: I am convinced this is a nesting issue. The spawner object will work just fine if un-nested or nested under an empty game object. The only time it fails is when it's nested under the player object.

« Last Edit: September 20, 2016, 06:25:10 PM by WayneAdams »

WayneAdams

  • Playmaker Newbie
  • *
  • Posts: 17
    • Glacier Studios
Re: Playmaker spawning projectile issue.
« Reply #5 on: September 20, 2016, 08:17:16 PM »
So here's my latest idea. Rather than parent the spawner to the player object, what is the most efficient way in playmaker to continuously update the spawner's position and rotation in relation to the player as if it was parented to the player object?

WayneAdams

  • Playmaker Newbie
  • *
  • Posts: 17
    • Glacier Studios
Re: Playmaker spawning projectile issue.
« Reply #6 on: September 20, 2016, 08:29:48 PM »
Removing the rigidbody from my player object and parenting the spawner inside it again seems to have fixed the problem without any adverse side effects. My player doesn't need to jump or do any sort of physics work outside of standard movement and she appears to work as designed for the most part. I feel odd about marking this thread SOLVED, but if an Admin feels it is you can mark it.

If everything seems ok in a few days i'll mark it myself.

Thanks!