|
Post by ghost010 on Jun 19, 2014 15:53:21 GMT
soo i have my fsm set up to spawn a bullet on key press(pool boss) the bullet it self has a impulse and Z-5.With the normal(spawn object) spawn action,it all works fine.but if i use pool boss spawn the bullet go's straight up into the sky(Y)...and i cant figure out why.
|
|
|
Post by DarkTonic Dev on Jun 19, 2014 23:31:53 GMT
You have to tell the bullet what position to spawn at with that action. Did you use the right X Y and Z? I don't know what "impulse" is.
|
|
|
Post by ghost010 on Jun 21, 2014 15:38:11 GMT
  This is what i have. Impulse is a way how the force is being apply to the object.the 5 on Z is the force in direction Z I have a get position on my bulletspawn and save that as a vector3. i read that vector in spawn location. The bullet does spawn at the location... but it shoots up into the sky. Also,does killable support raycast? id like to use raycast for a different weapon. Soo i made a new object(a cube this time) and this one spawns normal... until it gets despawned and re spawned. It does nor Reset its transforms to 0 no Mather what i do :S so if it gets spawned for the second time,it will fly in the same direction when it got spawned the first time.
|
|
|
Post by DarkTonic Dev on Jun 21, 2014 18:53:18 GMT
Core GameKit has no code for movement after spawning, and I'm unable to help on things that aren't part of the plugin due to lack of time right now, I'm sorry (and I'm actually a beginner in Playermaker). If it shoots up into the sky there's something wrong with your FSM but it has nothing to do with Core GameKit.
There is no raycast support either.
The last part sounds like you have initialization code that needs to fire each time the object spawns. From code you do that with the OnSpawned event, but you're not using code. I'm not sure how to solve that with Playmaker, but you might want to ask on the Playmaker forums.
|
|
|
Post by ghost010 on Jun 21, 2014 22:50:57 GMT
I got it figured out. It seems that using "Impulse" as a force is a really bad idea for pooling. Each time the prefab got re-spawned,it added a multiplier(z-5 per frame+ z-5 per frame) until it went light speed(lol). So instead of using impulse i used velocity change. after that i made some states and in the state before despawn,i added a set velocity and put every thing to 0.i also had to set the rotation to 0 or else the re-spawned prefab would remember the last rotation.    And for raycast, cant i script something that sends something that the core game listens to? so it know the killable got hit and dies?(i havent fully looked into the core yet,only in the looping)
|
|
|
Post by ghost010 on Jun 22, 2014 0:39:27 GMT
Never mind. conflict with other object game over state.
|
|
|
Post by DarkTonic Dev on Jun 22, 2014 4:44:56 GMT
Ok, impulse is bad  Glad you have it worked out.
|
|