|
Post by DarkTonic Dev on Aug 9, 2017 18:16:39 GMT
Sounds like any re-used pool item isn't getting initialized properly. I experienced this many times when I first started using pooling. Normally in a script (non-Playmaker), that's because coders put code into Awake and Start events, which only get called the first time the game object is used (first spawn), and not on any re-spawn. That code would need to move into OnSpawned method which gets called on every spawn. Now I can't see where your initialization or movement code are (pick a direction to travel in code too). Are you using Playmaker for that or is that some other script? If it is in Playmaker, you will need to make sure nothing is hooked into "awake" or "start", which I don't even know is a thing in Playmaker or not.
If you don't have "pick a rotation" code, then I need to see more of the Triggered Spawner settings. You should use Spawn Rotation Mode of "Use Spawner Rotation" I would think so it will be facing the same direction...
|
|
|
Post by DarkTonic Dev on Aug 9, 2017 19:48:55 GMT
The 5th example scene "Custom Events" pretty much does what you're having problems with, and it doesn't have any problems.
Triggered Spawner does indeed use the OnSpawned method and set the direction of the things spawned after they are spawned (same frame). I can only think it's a problem with your Playmaker movement stuff. Try instead to use "KW_Shot3.cs" for movement instead of Playmaker and see if you get different results. That just does a move forward but it's not Playmaker.
|
|
|
Post by DarkTonic Dev on Aug 9, 2017 22:19:31 GMT
#2, That's normal. Here's what's going on. If you despawned while still having a positive velocity, it will still be there when you respawn. You should set the velocity to zero before adding force when it's enabled (however you do that in Playmaker).
#1, figure out what life cycle event Playmaker is using for stuff...
|
|