playMaker

Author Topic: add force isn't doing what i want[SOLVED]  (Read 2032 times)

jellyam

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
add force isn't doing what i want[SOLVED]
« on: December 02, 2017, 08:33:03 AM »
hello playmaker folks. I have quite a problem with add force not really doing what i want it to. I've set my add force to use self space when its adding force but it seems like i'm stuck in world space. It is adding force to a newly created object.

here's a clip showing what i mean
https://www.youtube.com/watch?v=D4UGYLZbmPQ&feature=youtu.be

i also have my playmaker setup attached
« Last Edit: December 16, 2017, 08:42:59 AM by jellyam »

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 622
    • View Profile
    • Flashing Lights
Re: add force isn't doing what i want
« Reply #1 on: December 02, 2017, 08:35:54 AM »
In Add Force you need to set Vector or axis which one you want, like Z as forward. Put a value there.

jellyam

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: add force isn't doing what i want
« Reply #2 on: December 02, 2017, 10:22:33 AM »
i did do that right after i realized the picture didn't have a value in the y direction but it looks like its going by world space instead of self space you look at the little video clip. i set the y value to 20 and the mode right now is force

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 622
    • View Profile
    • Flashing Lights
Re: add force isn't doing what i want
« Reply #3 on: December 03, 2017, 05:41:45 AM »
Try with high numbers like 200, 2000, 20000 maybe the upward movement aligns it. Maybe can share screenshot of BlowFX inspector window too. How does the up move work?

jellyam

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: add force isn't doing what i want
« Reply #4 on: December 06, 2017, 09:18:46 AM »
right now my main computer's getting repaired and i won't be able to try other solutions until the weekend but i did try adding higher values to my add force and its still going up in world Y rather than local Y. I'll take a screen shot of the whole setup when i get my main computer back.

omgitstri

  • Playmaker Newbie
  • *
  • Posts: 46
    • View Profile
    • My Prototypes
Re: add force isn't doing what i want
« Reply #5 on: December 06, 2017, 09:34:32 AM »
Hello jellyam,

I think Self space only works if the object has a parent and it uses the parent's rotation.
You can use the Create Object Advanced action to set the object's parent when instantiating it then apply the force afterward.
« Last Edit: December 06, 2017, 09:36:15 AM by omgitstri »
Tri Nguyen
Game Designer at Nvizzio Creations

jellyam

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: add force isn't doing what i want
« Reply #6 on: December 09, 2017, 09:01:50 AM »
https://www.youtube.com/watch?v=PvypLHNUq_0

hey guys, i'm starting to wonder if this a bug, I tried what you suggested omgitstri and got the same result, BTW thanks for suggesting the advanced create object action. I always like finding cool new actions. But when i was trying to figure out what was going wrong i noticed that the first object created actually does what i want it to. check the link to see what i mean

can anyone try the same little setup and see if they get the same result?

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 622
    • View Profile
    • Flashing Lights
Re: add force isn't doing what i want
« Reply #7 on: December 09, 2017, 10:09:35 AM »
Probably while the create action set the correct rotation, the object it self get the force push before it. Maybe better add the force by spawner to the spawned object, you can save in variable and then in next state add force to that spawned obj.
Can't rely putting some other state like you did with Set Float or other. Also the computing power in editor is slower, so on actual Build this can be a bug again.

jellyam

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: add force isn't doing what i want
« Reply #8 on: December 11, 2017, 11:04:41 AM »
i'm not totally sure what you mean 600, i tried using add force on the newly spawned object, that's how my original setup worked but i'm still getting odd behavior

omgitstri

  • Playmaker Newbie
  • *
  • Posts: 46
    • View Profile
    • My Prototypes
Re: add force isn't doing what i want
« Reply #9 on: December 12, 2017, 07:23:39 PM »
i'm not totally sure what you mean 600, i tried using add force on the newly spawned object, that's how my original setup worked but i'm still getting odd behavior

Hello jellyam,

I've try to put together a quick scene, here's what I got
Also, it turns out you don't need to set the object as a child, all I did was apply force to the object after I instantiated it.

Tri Nguyen
Game Designer at Nvizzio Creations

jellyam

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: add force isn't doing what i want
« Reply #10 on: December 15, 2017, 11:25:48 AM »
omgitstri can you send me a unitypackage to try it out?

I copied your screenshot and i'm getting better results, still not perfect, but are you doing anything with the arrow_rotation variable? its a little hard to tell from the pictures


omgitstri

  • Playmaker Newbie
  • *
  • Posts: 46
    • View Profile
    • My Prototypes
Re: add force isn't doing what i want
« Reply #11 on: December 15, 2017, 11:32:34 AM »
I'm only grabbing the rotation of the arrow, I'll make a unitypackage for you in a few hours, still at work lol. It might take a while for me to make the package though, i've never tried it before.
Tri Nguyen
Game Designer at Nvizzio Creations

omgitstri

  • Playmaker Newbie
  • *
  • Posts: 46
    • View Profile
    • My Prototypes
Re: add force isn't doing what i want
« Reply #12 on: December 15, 2017, 03:58:45 PM »
Hello,

Here's the unity scene that i've set up. Hope this helps

I'm only adding the scene since i'm not too sure how to create a package sorry. And i made here that the actions used are teh basic one.
Tri Nguyen
Game Designer at Nvizzio Creations

jellyam

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: add force isn't doing what i want
« Reply #13 on: December 16, 2017, 08:41:59 AM »
yay, we can mark this one as solved. it did take a little more fanaggling but I now have a working setup. thanks omgitstri for providing the scene =)

after getting the local rotation of the spawner, applying that to the both to the create object's rotation and to the addforce vector in self space got me the result i was after.

thanks all for helping me out with this