playMaker

Author Topic: Using Physics Force on game objects  (Read 3069 times)

mweyna

  • Full Member
  • ***
  • Posts: 242
Using Physics Force on game objects
« on: October 26, 2013, 06:20:13 PM »
So in my scene I have a laser beam, any time an NPC walks across this beam, I want a physics object to push him in a direction. However, this could be applied to one NPC or if ten hit at the exact same time, all should be pushed in the same direction. I've tried using "Add Force" with just a direction assigned, no object, but it doesn't seem to have any impact. Each of my NPCs has a rigid box and a character controller. What am I doing wrong?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Using Physics Force on game objects
« Reply #1 on: October 27, 2013, 03:32:09 AM »
Hi,

 AddForce MUST target a gameobject, else it's doing nothing.

 you may want to look into assets from the asset store like:

http://u3d.as/content/lane-max/circular-gravity-force/4tu

bye,

Jean

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: Using Physics Force on game objects
« Reply #2 on: October 27, 2013, 10:41:58 AM »
Looks awesome, is there a playmaker addon for it anywhere?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Using Physics Force on game objects
« Reply #3 on: October 27, 2013, 10:51:59 AM »
You don't really need one, its very simple. Just drag the script onto the object and adjust the settings. You can control the variables on it with Get Property and Set Property actions very easily.

It's weird that you might want to use it for character control though, I don't see how it applies to that in particular.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

mweyna

  • Full Member
  • ***
  • Posts: 242
Re: Using Physics Force on game objects
« Reply #4 on: October 27, 2013, 07:08:11 PM »
Before I pull the trigger on the purchase, can either of you guys confirm something for me?

- It's not process heavy that multiple of them wouldn't clog up a mobile device?
- It can affect objects in more then a circular shape (so a line or rectangle is what I'm going for)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Using Physics Force on game objects
« Reply #5 on: October 28, 2013, 01:29:33 AM »
Hi,

 You should contact the author to get this kind fo confirmations, this is the best and reliable way of checking and make sure you are making the right purchase.

bye,

 Jean

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Using Physics Force on game objects
« Reply #6 on: October 28, 2013, 08:24:19 PM »
Touching on what Lane said... A character controller will not react to physic forces without implicitly making it realize that it needs to. If you do actually have a rigid body and character controller component attached to the same Game object I would suggest doing some more reading on both of those components. I don't say that harshly, I just think that maybe brushing up on those might point you in a better direction.