playMaker

Author Topic: [SOLVED]Create Object problem  (Read 2875 times)

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
[SOLVED]Create Object problem
« on: December 22, 2013, 09:38:01 PM »
Hello,

I have the following test setup:
-Main game object (cube)
-Empty game object (spawn position)
-Bullet (capsule)

Now, when i want to spawn(create object) from a spawn point(empty game object) which is parented to my main game object(cube), the bullet flies on the world space z axis on the empty object, and i need it to fly on the self space z axis.

How can i acheive this?

Thanks in advance.

« Last Edit: December 23, 2013, 10:57:33 AM by Nitrohex »
Sign Up Now @ StartApp.com

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Create Object problem
« Reply #1 on: December 22, 2013, 11:08:36 PM »
Create Object and point at the spawn point, choose a prefab (to spawn).

On the bullet prefab, put an Add Force modifier (if physics) with some positive force amount on the Z axis and choose every frame with Self Space.

That's pretty much it.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
Re: Create Object problem
« Reply #2 on: December 22, 2013, 11:34:46 PM »
I did exactly this, but my issue is that the bullet's z vector of travel is along the world space of the spawn point(empty object).

When i rotate the main object (cube), and shoot, the bullet goes on the world z axis on the empty game object-spawn point.

Create Object/spawn point action spawn the defined object in a world space of the spawn point object.

Bellow is a graphical explanation of my problem.
Sign Up Now @ StartApp.com

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Create Object problem
« Reply #3 on: December 23, 2013, 07:13:29 AM »
Here's an example.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Create Object problem
« Reply #4 on: December 23, 2013, 09:11:58 AM »
Also, you're seeing the object pivot stay wrt World because you're toggled that way. Press X to switch the transform controllers function.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
Re: Create Object problem
« Reply #5 on: December 23, 2013, 10:56:49 AM »
 :-[ :-[ :-[

After your example, i realized the i have 90 deg input on X rotation in Create Object settings...

So embarrassed for not seeing this...


Thanks a LOT Lane :)
Sign Up Now @ StartApp.com

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: [SOLVED]Create Object problem
« Reply #6 on: December 23, 2013, 11:10:08 AM »
Don't sweat it, happens to everybody.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D