Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on Aug 25, 2016 9:42:21 GMT
Hi again,
i have a small issue, and i need an advice on how to handle it. I've got a ship which spawns its own gunpoint upon spawning itself (due to unity's limitations on prefab nesting, the ship's part of a prefab group of ships already). The position of the gunpoint is important of course, but i can't quite get how to position it good. The options of the Spawn Position Mode in the Playmaker action include:
Use this object position - spawns it in the middle of the object, can't be further adjusted in the spawn location xyz underneath. Other object for position - can't use it because i would need to nest a prefab for that. Use vector 3 - i can adjust the position of the gunpoint, but in world space, not on self space.
Any ideas?
|
|
|
Post by DarkTonic Dev on Aug 25, 2016 15:29:19 GMT
use the vector 3 and set it to the ship's position plus whatever offset will make it look good. Use a Playmaker variable.
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on Aug 26, 2016 8:31:43 GMT
Well, that didn't work out. The ship is moving, and the prefab spawns in world space. Vector 3 Variable Core Game Kit Pool Boss Spawn Action settings. Prefab to spawn: Gunpoint object. Spawn Location: Vector 3 Variable The little gun spawning far away from spawning point (tubes on the ship)
|
|
|
Post by DarkTonic Dev on Aug 26, 2016 15:49:44 GMT
Doesn't matter if the ship is moving if you set the variable equal to its position during the same frame. Show me that setting.
If it's not something wrong there, I have no more things to try unless you send me a project.
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on Aug 26, 2016 17:34:35 GMT
Oh i got it now, i got the world position from the ship and set the local position of the gunpoint to the stored variable and tweak it. Works like a charm, i just needed to make separate prefabs for every tube. Thanks!
|
|
|
Post by DarkTonic Dev on Aug 26, 2016 18:00:13 GMT
Awesome!
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on Dec 30, 2019 14:07:08 GMT
Hi, just a short question regarding this, i didn't want to open a new thread since it's related. If i use "Use this object position" for spawn position mode and i enter values in spawn location, will they be used as a local offset or not?
|
|
|
Post by DarkTonic Dev on Dec 30, 2019 16:47:47 GMT
Well it's the same behavior as the normal spawner. I'd think no.
|
|
Oshigawa
Full Member
Posts: 228
Posts: 228
|
Post by Oshigawa on Dec 30, 2019 19:34:28 GMT
Ok, thanks
|
|
|
Post by DarkTonic Dev on Dec 30, 2019 22:33:49 GMT
No problem. It's unfortunate that the Playmaker UI can't hide fields conditionally....
|
|